]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/pending/property_serialize.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / pending / property_serialize.hpp
1 // (C) Copyright Jeremy Siek 2006
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_PROPERTY_SERIALIZE_HPP
7 #define BOOST_PROPERTY_SERIALIZE_HPP
8
9 #include <boost/pending/property.hpp>
10 #ifdef BOOST_GRAPH_USE_MPI
11 #include <boost/mpi/datatype.hpp>
12 #include <boost/serialization/is_bitwise_serializable.hpp>
13 #endif // BOOST_GRAPH_USE_MPI
14
15 #include <boost/serialization/base_object.hpp>
16 #include <boost/serialization/nvp.hpp>
17
18 namespace boost {
19 template<class Archive>
20 inline void serialize(Archive&, no_property&, const unsigned int) { }
21
22 template<class Archive, class Tag, class T, class Base>
23 void
24 serialize(Archive& ar, property<Tag, T, Base>& prop,
25 const unsigned int /*version*/)
26 {
27 ar & serialization::make_nvp( "property_value" , prop.m_value );
28 ar & serialization::make_nvp( "property_base" , prop.m_base );
29 }
30
31 #ifdef BOOST_GRAPH_USE_MPI
32 namespace mpi {
33 template<typename Tag, typename T, typename Base>
34 struct is_mpi_datatype<property<Tag, T, Base> >
35 : mpl::and_<is_mpi_datatype<T>,
36 is_mpi_datatype<Base> > { };
37 }
38
39 namespace serialization {
40 template<typename Tag, typename T, typename Base>
41 struct is_bitwise_serializable<property<Tag, T, Base> >
42 : mpl::and_<is_bitwise_serializable<T>,
43 is_bitwise_serializable<Base> > { };
44
45 template<typename Tag, typename T, typename Base>
46 struct implementation_level<property<Tag, T, Base> >
47 : mpl::int_<object_serializable> {} ;
48
49 template<typename Tag, typename T, typename Base>
50 struct tracking_level<property<Tag, T, Base> >
51 : mpl::int_<track_never> {} ;
52
53 }
54 #endif // BOOST_GRAPH_USE_MPI
55
56 } // end namespace boost
57
58 #ifdef BOOST_GRAPH_USE_MPI
59 namespace boost { namespace mpi {
60 template<>
61 struct is_mpi_datatype<boost::no_property> : mpl::true_ { };
62
63 } } // end namespace boost::mpi
64
65 BOOST_IS_BITWISE_SERIALIZABLE(boost::no_property)
66 BOOST_CLASS_IMPLEMENTATION(boost::no_property,object_serializable)
67 BOOST_CLASS_TRACKING(boost::no_property,track_never)
68 #endif // BOOST_GRAPH_USE_MPI
69
70 #endif // BOOST_PROPERTY_SERIALIZE_HPP