sl@0: #ifndef BOOST_SERIALIZATION_TRAITS_HPP sl@0: #define BOOST_SERIALIZATION_TRAITS_HPP sl@0: sl@0: // MS compatible compilers support #pragma once sl@0: #if defined(_MSC_VER) && (_MSC_VER >= 1020) sl@0: # pragma once sl@0: #endif sl@0: sl@0: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 sl@0: // traits.hpp: sl@0: sl@0: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . sl@0: // Use, modification and distribution is subject to the Boost Software sl@0: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: sl@0: // This header is used to apply serialization traits to templates. The sl@0: // standard system can't be used for platforms which don't support sl@0: // Partial Templlate Specialization. sl@0: sl@0: // The motivation for this is the Name-Value Pair (NVP) template. sl@0: // it has to work the same on all platforms in order for archives sl@0: // to be portable accross platforms. sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { sl@0: namespace serialization { sl@0: sl@0: // common base class used to detect appended traits class sl@0: struct basic_traits {}; sl@0: sl@0: template sl@0: struct extended_type_info_impl; sl@0: sl@0: template< sl@0: class T, sl@0: int Level, sl@0: int Tracking, sl@0: unsigned int Version = 0, sl@0: class ETII = extended_type_info_impl< T > sl@0: > sl@0: struct traits : public basic_traits { sl@0: BOOST_STATIC_ASSERT(Version == 0 || Level >= object_class_info); sl@0: BOOST_STATIC_ASSERT(Tracking == track_never || Level >= object_serializable); sl@0: typedef BOOST_DEDUCED_TYPENAME mpl::int_ level; sl@0: typedef BOOST_DEDUCED_TYPENAME mpl::int_ tracking; sl@0: typedef BOOST_DEDUCED_TYPENAME mpl::int_ version; sl@0: typedef ETII type_info_implementation; sl@0: }; sl@0: sl@0: } // namespace serialization sl@0: } // namespace boost sl@0: sl@0: #endif // BOOST_SERIALIZATION_TRAITS_HPP