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