serialization_version.hpp
Go to the documentation of this file.
1 /* Copyright 2003-2013 Joaquin M Lopez Munoz.
2  * Distributed under the Boost Software License, Version 1.0.
3  * (See accompanying file LICENSE_1_0.txt or copy at
4  * http://www.boost.org/LICENSE_1_0.txt)
5  *
6  * See http://www.boost.org/libs/multi_index for library home page.
7  */
8 
9 #ifndef BOOST_MULTI_INDEX_DETAIL_SERIALIZATION_VERSION_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_SERIALIZATION_VERSION_HPP
11 
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15 
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
19 
20 namespace boost{
21 
22 namespace multi_index{
23 
24 namespace detail{
25 
26 /* Helper class for storing and retrieving a given type serialization class
27  * version while avoiding saving the number multiple times in the same
28  * archive.
29  * Behavior undefined if template partial specialization is not supported.
30  */
31 
32 template<typename T>
34 {
36  value(boost::serialization::version<serialization_version>::value){}
37 
38  serialization_version& operator=(unsigned int x){value=x;return *this;};
39 
40  operator unsigned int()const{return value;}
41 
42 private:
44 
46 
47  template<class Archive>
48  void save(Archive&,const unsigned int)const{}
49 
50  template<class Archive>
51  void load(Archive&,const unsigned int version)
52  {
53  this->value=version;
54  }
55 
56  unsigned int value;
57 };
58 
59 } /* namespace multi_index::detail */
60 
61 } /* namespace multi_index */
62 
63 namespace serialization {
64 template<typename T>
66 {
68 };
69 } /* namespace serialization */
70 
71 } /* namespace boost */
72 
73 #endif
boost::multi_index::detail::serialization_version::load
void load(Archive &, const unsigned int version)
Definition: serialization_version.hpp:51
config.hpp
boost::multi_index::detail::serialization_version::serialization_version
serialization_version()
Definition: serialization_version.hpp:35
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::serialization::version
Definition: serialization/version.hpp:36
boost::multi_index::detail::serialization_version::save
void save(Archive &, const unsigned int) const
Definition: serialization_version.hpp:48
boost::multi_index::detail::serialization_version
Definition: serialization_version.hpp:33
boost::serialization::version::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(int, value=version::type::value)
BOOST_SERIALIZATION_SPLIT_MEMBER
#define BOOST_SERIALIZATION_SPLIT_MEMBER()
Definition: split_member.hpp:76
split_member.hpp
version.hpp
boost::multi_index::detail::serialization_version::operator=
serialization_version & operator=(unsigned int x)
Definition: serialization_version.hpp:38
boost::multi_index::detail::serialization_version::value
unsigned int value
Definition: serialization_version.hpp:56
boost::serialization::access
Definition: access.hpp:49


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