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
multi_index
detail
index_node_base.hpp
Go to the documentation of this file.
1
/* Copyright 2003-2015 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_INDEX_NODE_BASE_HPP
10
#define BOOST_MULTI_INDEX_DETAIL_INDEX_NODE_BASE_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 */
17
#include <
boost/type_traits/aligned_storage.hpp
>
18
#include <
boost/type_traits/alignment_of.hpp
>
19
20
#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
21
#include <
boost/archive/archive_exception.hpp
>
22
#include <
boost/serialization/access.hpp
>
23
#include <
boost/throw_exception.hpp
>
24
#endif
25
26
namespace
boost
{
27
28
namespace
multi_index{
29
30
namespace
detail{
31
32
/* index_node_base tops the node hierarchy of multi_index_container. It holds
33
* the value of the element contained.
34
*/
35
36
template
<
typename
Value>
37
struct
pod_value_holder
38
{
39
typename
aligned_storage
<
40
sizeof
(Value),
41
alignment_of<Value>::value
42
>::
type
space
;
43
};
44
45
template
<
typename
Value,
typename
Allocator>
46
struct
index_node_base
:
private
pod_value_holder
<Value>
47
{
48
typedef
index_node_base
base_type
;
/* used for serialization purposes */
49
typedef
Value
value_type
;
50
typedef
Allocator
allocator_type
;
51
52
value_type
&
value
()
53
{
54
return
*
reinterpret_cast<
value_type
*
>
(&this->
space
);
55
}
56
57
const
value_type&
value
()
const
58
{
59
return
*
reinterpret_cast<
const
value_type
*
>
(&this->
space
);
60
}
61
62
static
index_node_base
*
from_value
(
const
value_type
* p)
63
{
64
return
static_cast<
index_node_base
*
>
(
65
reinterpret_cast<
pod_value_holder<Value>
*
>
(
/* std 9.2.17 */
66
const_cast<
value_type
*
>
(p)));
67
}
68
69
private
:
70
#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
71
friend
class
boost::serialization::access
;
72
73
/* nodes do not emit any kind of serialization info. They are
74
* fed to Boost.Serialization so that pointers to nodes are
75
* tracked correctly.
76
*/
77
78
template
<
class
Archive>
79
void
serialize
(Archive&,
const
unsigned
int
)
80
{
81
}
82
#endif
83
};
84
85
template
<
typename
Node,
typename
Value>
86
Node*
node_from_value
(
const
Value* p)
87
{
88
typedef
typename
Node::allocator_type allocator_type;
89
return
static_cast<
Node*
>
(
90
index_node_base<Value,allocator_type>::from_value
(p));
91
}
92
93
}
/* namespace multi_index::detail */
94
95
}
/* namespace multi_index */
96
97
#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
98
/* Index nodes never get constructed directly by Boost.Serialization,
99
* as archives are always fed pointers to previously existent
100
* nodes. So, if this is called it means we are dealing with a
101
* somehow invalid archive.
102
*/
103
104
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
105
namespace
serialization{
106
#else
107
namespace
multi_index{
108
namespace
detail{
109
#endif
110
111
template
<
class
Archive,
typename
Value,
typename
Allocator>
112
inline
void
load_construct_data
(
113
Archive&,
boost::multi_index::detail::index_node_base<Value,Allocator>
*,
114
const
unsigned
int
)
115
{
116
throw_exception
(
117
archive::archive_exception
(
archive::archive_exception::other_exception
));
118
}
119
120
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
121
}
/* namespace serialization */
122
#else
123
}
/* namespace multi_index::detail */
124
}
/* namespace multi_index */
125
#endif
126
127
#endif
128
129
}
/* namespace boost */
130
131
#endif
boost::multi_index::detail::index_node_base::value_type
Value value_type
Definition:
index_node_base.hpp:49
config.hpp
boost::type
Definition:
type.hpp:14
boost::throw_exception
BOOST_NORETURN void throw_exception(E const &e)
Definition:
throw_exception.hpp:62
alignment_of.hpp
boost::multi_index::detail::index_node_base::value
const value_type & value() const
Definition:
index_node_base.hpp:57
boost::aligned_storage
Definition:
type_traits/aligned_storage.hpp:75
aligned_storage.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
access.hpp
boost::archive::archive_exception::other_exception
@ other_exception
Definition:
archive_exception.hpp:55
boost::multi_index::detail::index_node_base
Definition:
index_node_base.hpp:46
boost::multi_index::detail::pod_value_holder::space
aligned_storage< sizeof(Value), alignment_of< Value >::value >::type space
Definition:
index_node_base.hpp:42
boost::multi_index::detail::index_node_base::from_value
static index_node_base * from_value(const value_type *p)
Definition:
index_node_base.hpp:62
boost::alignment_of
Definition:
alignment_of.hpp:28
boost::multi_index::detail::index_node_base::base_type
index_node_base base_type
Definition:
index_node_base.hpp:48
boost::archive::archive_exception
Definition:
archive_exception.hpp:42
boost::multi_index::detail::index_node_base::serialize
void serialize(Archive &, const unsigned int)
Definition:
index_node_base.hpp:79
boost::multi_index::detail::pod_value_holder
Definition:
index_node_base.hpp:37
throw_exception.hpp
boost::multi_index::detail::index_node_base::value
value_type & value()
Definition:
index_node_base.hpp:52
boost::multi_index::detail::node_from_value
Node * node_from_value(const Value *p)
Definition:
index_node_base.hpp:86
archive_exception.hpp
boost::multi_index::detail::index_node_base::allocator_type
Allocator allocator_type
Definition:
index_node_base.hpp:50
boost::serialization::load_construct_data
void load_construct_data(Archive &, T *t, const unsigned int)
Definition:
serialization.hpp:84
boost::serialization::access
Definition:
access.hpp:49
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:39:49