level.hpp
Go to the documentation of this file.
1 #ifndef BOOST_SERIALIZATION_LEVEL_HPP
2 #define BOOST_SERIALIZATION_LEVEL_HPP
3 
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER)
6 # pragma once
7 #endif
8 
10 // level.hpp:
11 
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
16 
17 // See http://www.boost.org for updates, documentation, and revision history.
18 
19 #include <boost/config.hpp>
21 
27 
28 #include <boost/mpl/eval_if.hpp>
29 #include <boost/mpl/int.hpp>
30 #include <boost/mpl/integral_c.hpp>
32 
34 
35 namespace boost {
36 namespace serialization {
37 
38 struct basic_traits;
39 
40 // default serialization implementation level
41 template<class T>
43  template<class U>
45  typedef typename U::level type;
46  };
47 
48  typedef mpl::integral_c_tag tag;
49  // note: at least one compiler complained w/o the full qualification
50  // on basic traits below
51  typedef
52  typename mpl::eval_if<
54  traits_class_level< T >,
55  //else
56  typename mpl::eval_if<
58  mpl::int_<primitive_type>,
59  //else
60  typename mpl::eval_if<
62  mpl::int_<object_class_info>,
63  //else
64  typename mpl::eval_if<
66  mpl::int_<object_serializable>,
67  //else
68  typename mpl::eval_if<
70  mpl::int_<primitive_type>,
71  //else
72  mpl::int_<not_serializable>
73  >
74  >
75  >
76  >
78  // vc 7.1 doesn't like enums here
79  BOOST_STATIC_CONSTANT(int, value = type::value);
80 };
81 
82 template<class T>
84  public implementation_level_impl<const T>
85 {
86 };
87 
88 template<class T, int L>
90 {
91  return t.value >= (int)l;
92 }
93 
94 } // namespace serialization
95 } // namespace boost
96 
97 // specify the level of serialization implementation for the class
98 // require that class info saved when versioning is used
99 #define BOOST_CLASS_IMPLEMENTATION(T, E) \
100  namespace boost { \
101  namespace serialization { \
102  template <> \
103  struct implementation_level_impl< const T > \
104  { \
105  typedef mpl::integral_c_tag tag; \
106  typedef mpl::int_< E > type; \
107  BOOST_STATIC_CONSTANT( \
108  int, \
109  value = implementation_level_impl::type::value \
110  ); \
111  }; \
112  } \
113  }
114 
115 
116 #endif // BOOST_SERIALIZATION_LEVEL_HPP
config.hpp
boost::is_class
Definition: is_class.hpp:105
boost::serialization::operator>=
bool operator>=(implementation_level< T > t, enum level_type l)
Definition: level.hpp:89
int.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::is_enum
Definition: is_enum.hpp:148
boost::is_fundamental
Definition: is_fundamental.hpp:21
boost::serialization::implementation_level_impl::traits_class_level
Definition: level.hpp:44
boost::serialization::implementation_level_impl
Definition: level.hpp:42
is_class.hpp
boost::is_base_and_derived
Definition: is_base_and_derived.hpp:231
boost::serialization::implementation_level_impl< const T >::type
mpl::eval_if< is_base_and_derived< boost::serialization::basic_traits, const T >, traits_class_level< const T >, typename mpl::eval_if< is_fundamental< const T >, mpl::int_< primitive_type >, typename mpl::eval_if< is_class< const T >, mpl::int_< object_class_info >, typename mpl::eval_if< is_array< const T >, mpl::int_< object_serializable >, typename mpl::eval_if< is_enum< const T >, mpl::int_< primitive_type >, mpl::int_< not_serializable > > > > > >::type type
Definition: level.hpp:77
level_enum.hpp
boost::serialization::implementation_level_impl::traits_class_level::type
U::level type
Definition: level.hpp:45
is_enum.hpp
eval_if.hpp
integral_c_tag.hpp
boost::mpl::eval_if
Definition: gcc/basic_bind.hpp:408
is_base_and_derived.hpp
integral_c.hpp
is_array.hpp
is_fundamental.hpp
boost::serialization::implementation_level_impl::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(int, value=type::value)
boost::serialization::level_type
level_type
Definition: level_enum.hpp:26
workaround.hpp
boost::is_array
Definition: is_array.hpp:25
boost::serialization::implementation_level_impl::tag
mpl::integral_c_tag tag
Definition: level.hpp:48
boost::serialization::implementation_level
Definition: level.hpp:83


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:42:04