sick_visionary_cpp_shared
3pp
boost
serialization
split_free.hpp
Go to the documentation of this file.
1
#ifndef BOOST_SERIALIZATION_SPLIT_FREE_HPP
2
#define BOOST_SERIALIZATION_SPLIT_FREE_HPP
3
4
// MS compatible compilers support #pragma once
5
#if defined(_MSC_VER)
6
# pragma once
7
#endif
8
10
// split_free.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
>
20
#include <
boost/mpl/eval_if.hpp
>
21
#include <
boost/mpl/identity.hpp
>
22
#include <
boost/serialization/serialization.hpp
>
23
24
namespace
boost
{
25
namespace
archive {
26
namespace
detail {
27
template
<
class
Archive>
class
interface_oarchive
;
28
template
<
class
Archive>
class
interface_iarchive
;
29
}
// namespace detail
30
}
// namespace archive
31
32
namespace
serialization {
33
34
//namespace detail {
35
template
<
class
Archive,
class
T>
36
struct
free_saver
{
37
static
void
invoke
(
38
Archive & ar,
39
const
T
& t,
40
const
unsigned
int
file_version
41
){
42
// use function overload (version_type) to workaround
43
// two-phase lookup issue
44
const
version_type v(file_version);
45
save(ar, t, v);
46
}
47
};
48
template
<
class
Archive,
class
T>
49
struct
free_loader
{
50
static
void
invoke
(
51
Archive & ar,
52
T
& t,
53
const
unsigned
int
file_version
54
){
55
// use function overload (version_type) to workaround
56
// two-phase lookup issue
57
const
version_type v(file_version);
58
load(ar, t, v);
59
}
60
};
61
//} // namespace detail
62
63
template
<
class
Archive,
class
T>
64
inline
void
split_free
(
65
Archive & ar,
66
T
& t,
67
const
unsigned
int
file_version
68
){
69
typedef
typename
mpl::eval_if
<
70
typename
Archive::is_saving,
71
mpl::identity
<
/* detail:: */
free_saver<Archive, T>
>,
72
mpl::identity
<
/* detail:: */
free_loader<Archive, T>
>
73
>
::type
typex;
74
typex::invoke(ar, t, file_version);
75
}
76
77
}
// namespace serialization
78
}
// namespace boost
79
80
#define BOOST_SERIALIZATION_SPLIT_FREE(T) \
81
namespace boost { namespace serialization { \
82
template<class Archive> \
83
inline void serialize( \
84
Archive & ar, \
85
T & t, \
86
const unsigned int file_version \
87
){ \
88
split_free(ar, t, file_version); \
89
} \
90
}}
91
92
93
#endif // BOOST_SERIALIZATION_SPLIT_FREE_HPP
boost::serialization::free_loader
Definition:
split_free.hpp:49
identity.hpp
T
T
Definition:
mem_fn_cc.hpp:25
config.hpp
boost::type
Definition:
type.hpp:14
boost::serialization::split_free
void split_free(Archive &ar, T &t, const unsigned int file_version)
Definition:
split_free.hpp:64
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
serialization.hpp
boost::serialization::free_saver
Definition:
split_free.hpp:36
boost::mpl::identity
Definition:
mpl/identity.hpp:25
boost::archive::detail::interface_iarchive
Definition:
split_free.hpp:28
eval_if.hpp
boost::mpl::eval_if
Definition:
gcc/basic_bind.hpp:408
boost::serialization::free_loader::invoke
static void invoke(Archive &ar, T &t, const unsigned int file_version)
Definition:
split_free.hpp:50
boost::serialization::free_saver::invoke
static void invoke(Archive &ar, const T &t, const unsigned int file_version)
Definition:
split_free.hpp:37
boost::archive::detail::interface_oarchive
Definition:
split_free.hpp:27
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:48:40