epoc32/include/stdapis/boost/serialization/traits.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/serialization/traits.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,62 @@
     1.4 +#ifndef BOOST_SERIALIZATION_TRAITS_HPP
     1.5 +#define BOOST_SERIALIZATION_TRAITS_HPP
     1.6 +
     1.7 +// MS compatible compilers support #pragma once
     1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
     1.9 +# pragma once
    1.10 +#endif
    1.11 +
    1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1.13 +// traits.hpp:
    1.14 +
    1.15 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
    1.16 +// Use, modification and distribution is subject to the Boost Software
    1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1.18 +// http://www.boost.org/LICENSE_1_0.txt)
    1.19 +
    1.20 +//  See http://www.boost.org for updates, documentation, and revision history.
    1.21 +
    1.22 +// This header is used to apply serialization traits to templates.  The
    1.23 +// standard system can't be used for platforms which don't support
    1.24 +// Partial Templlate Specialization.  
    1.25 +
    1.26 +// The motivation for this is the Name-Value Pair (NVP) template.
    1.27 +// it has to work the same on all platforms in order for archives
    1.28 +// to be portable accross platforms.
    1.29 +
    1.30 +#include <boost/config.hpp>
    1.31 +#include <boost/static_assert.hpp>
    1.32 +
    1.33 +#include <boost/mpl/int.hpp>
    1.34 +#include <boost/serialization/level_enum.hpp>
    1.35 +#include <boost/serialization/tracking_enum.hpp>
    1.36 +
    1.37 +namespace boost {
    1.38 +namespace serialization {
    1.39 +
    1.40 +// common base class used to detect appended traits class
    1.41 +struct basic_traits {};
    1.42 +
    1.43 +template <class T>
    1.44 +struct extended_type_info_impl;
    1.45 +
    1.46 +template<
    1.47 +    class T, 
    1.48 +    int Level, 
    1.49 +    int Tracking,
    1.50 +    unsigned int Version = 0,
    1.51 +    class ETII = extended_type_info_impl< T >
    1.52 +>
    1.53 +struct traits : public basic_traits {
    1.54 +    BOOST_STATIC_ASSERT(Version == 0 || Level >= object_class_info);
    1.55 +    BOOST_STATIC_ASSERT(Tracking == track_never || Level >= object_serializable);
    1.56 +    typedef BOOST_DEDUCED_TYPENAME mpl::int_<Level> level;
    1.57 +    typedef BOOST_DEDUCED_TYPENAME mpl::int_<Tracking> tracking;
    1.58 +    typedef BOOST_DEDUCED_TYPENAME mpl::int_<Version> version;
    1.59 +    typedef ETII type_info_implementation;
    1.60 +};
    1.61 +
    1.62 +} // namespace serialization
    1.63 +} // namespace boost
    1.64 +
    1.65 +#endif // BOOST_SERIALIZATION_TRAITS_HPP