Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Variables
_
a
b
i
k
n
p
r
s
t
v
Typedefs
a
b
c
f
h
i
m
n
p
s
t
u
w
y
Enumerations
Enumerator
a
b
c
e
f
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
Enumerator
a
b
c
e
g
i
k
l
m
n
o
p
r
s
u
v
Related Functions
a
b
c
d
e
i
l
m
o
r
s
u
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
g
m
o
p
r
s
t
Variables
_
a
b
f
g
l
t
u
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
e
f
g
i
l
m
r
s
u
v
w
x
sick_visionary_cpp_shared
3pp
boost
serialization
base_object.hpp
Go to the documentation of this file.
1
#ifndef BOOST_SERIALIZATION_BASE_OBJECT_HPP
2
#define BOOST_SERIALIZATION_BASE_OBJECT_HPP
3
4
// MS compatible compilers support #pragma once
5
#if defined(_MSC_VER)
6
# pragma once
7
#endif
8
10
// base_object.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
// if no archive headers have been included this is a no op
20
// this is to permit BOOST_EXPORT etc to be included in a
21
// file declaration header
22
23
#include <
boost/config.hpp
>
24
#include <
boost/detail/workaround.hpp
>
25
26
#include <
boost/mpl/eval_if.hpp
>
27
#include <
boost/mpl/int.hpp
>
28
#include <
boost/mpl/identity.hpp
>
29
30
#include <
boost/type_traits/is_base_and_derived.hpp
>
31
#include <
boost/type_traits/is_pointer.hpp
>
32
#include <
boost/type_traits/is_const.hpp
>
33
#include <
boost/type_traits/is_polymorphic.hpp
>
34
35
#include <
boost/static_assert.hpp
>
36
#include <
boost/serialization/access.hpp
>
37
#include <
boost/serialization/force_include.hpp
>
38
#include <
boost/serialization/void_cast_fwd.hpp
>
39
40
namespace
boost
{
41
namespace
serialization {
42
43
namespace
detail
44
{
45
// get the base type for a given derived type
46
// preserving the const-ness
47
template
<
class
B,
class
D>
48
struct
base_cast
49
{
50
typedef
typename
51
mpl::if_
<
52
is_const<D>
,
53
const
B,
54
B
55
>
::type
type
;
56
BOOST_STATIC_ASSERT
(
is_const<type>::value
==
is_const<D>::value
);
57
};
58
59
// only register void casts if the types are polymorphic
60
template
<
class
Base,
class
Derived>
61
struct
base_register
62
{
63
struct
polymorphic
{
64
static
void
const
*
invoke
(){
65
Base
const
*
const
b = 0;
66
Derived
const
*
const
d
= 0;
67
return
&
void_cast_register
(
d
, b);
68
}
69
};
70
struct
non_polymorphic
{
71
static
void
const
*
invoke
(){
72
return
0;
73
}
74
};
75
static
void
const
*
invoke
(){
76
typedef
typename
mpl::eval_if
<
77
is_polymorphic<Base>
,
78
mpl::identity<polymorphic>
,
79
mpl::identity<non_polymorphic>
80
>
::type
type
;
81
return
type::invoke();
82
}
83
};
84
85
}
// namespace detail
86
template
<
class
Base,
class
Derived>
87
typename
detail::base_cast<Base, Derived>::type
&
88
base_object
(Derived &d)
89
{
90
BOOST_STATIC_ASSERT
((
is_base_and_derived<Base,Derived>::value
));
91
BOOST_STATIC_ASSERT
(!
is_pointer<Derived>::value
);
92
typedef
typename
detail::base_cast<Base, Derived>::type
type
;
93
detail::base_register<type, Derived>::invoke
();
94
return
access::cast_reference<type, Derived>(
d
);
95
}
96
97
}
// namespace serialization
98
}
// namespace boost
99
100
#endif // BOOST_SERIALIZATION_BASE_OBJECT_HPP
boost::serialization::detail::base_cast::type
mpl::if_< is_const< D >, const B, B >::type type
Definition:
base_object.hpp:55
boost::is_polymorphic
Definition:
is_polymorphic.hpp:108
is_polymorphic.hpp
identity.hpp
config.hpp
boost::serialization::detail::base_register::polymorphic::invoke
static const void * invoke()
Definition:
base_object.hpp:64
static_assert.hpp
boost::type
Definition:
type.hpp:14
int.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
access.hpp
is_pointer.hpp
force_include.hpp
boost::is_base_and_derived
Definition:
is_base_and_derived.hpp:231
boost::mpl::identity
Definition:
mpl/identity.hpp:25
boost::serialization::detail::base_cast
Definition:
base_object.hpp:48
Base
boost::serialization::base_object
detail::base_cast< Base, Derived >::type & base_object(Derived &d)
Definition:
base_object.hpp:88
boost::is_const
Definition:
is_const.hpp:37
d
d
boost::serialization::detail::base_register::non_polymorphic
Definition:
base_object.hpp:70
is_const.hpp
eval_if.hpp
boost::mpl::eval_if
Definition:
gcc/basic_bind.hpp:408
boost::serialization::detail::base_register
Definition:
base_object.hpp:61
is_base_and_derived.hpp
boost::serialization::detail::base_register::non_polymorphic::invoke
static const void * invoke()
Definition:
base_object.hpp:71
boost::mpl::if_
Definition:
dmc/basic_bind.hpp:374
boost::serialization::void_cast_register
const BOOST_DLLEXPORT void_cast_detail::void_caster & void_cast_register(const Derived *dnull=NULL, const Base *bnull=NULL) BOOST_USED
void_cast_fwd.hpp
boost::serialization::detail::base_register::polymorphic
Definition:
base_object.hpp:63
boost::serialization::detail::base_cast::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT(is_const< type >::value==is_const< D >::value)
BOOST_STATIC_ASSERT
#define BOOST_STATIC_ASSERT(...)
Definition:
static_assert.hpp:70
workaround.hpp
boost::serialization::detail::base_register::invoke
static const void * invoke()
Definition:
base_object.hpp:75
boost::is_pointer
Definition:
is_pointer.hpp:31
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:36:39