NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
g
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
f
i
k
l
n
o
p
s
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
multi-type-container.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef MULTI_TYPE_CONTAINER_H_
21
#define MULTI_TYPE_CONTAINER_H_
22
24
25
#include <boost/mpl/inherit_linearly.hpp>
26
#include <boost/mpl/inherit.hpp>
27
#include <boost/mpl/at.hpp>
28
29
namespace
ns3
{
30
namespace
ndn
{
31
namespace
ndnSIM
{
32
namespace
detail {
33
34
template
<
class
T>
35
struct
wrap {
36
T value_;
37
};
38
39
template
<
class
Vector>
40
struct
multi_type_container
41
:
public
boost::mpl::inherit_linearly<Vector, boost::mpl::inherit<wrap<boost::mpl::_2>,
42
boost::mpl::_1>>::type {
43
template
<
int
N>
44
struct
index {
45
typedef
typename
boost::mpl::at_c<Vector, N>::type type;
46
};
47
48
template
<
class
T>
49
T&
50
get
()
51
{
52
return
static_cast<
wrap<T>&
>
(*this).value_;
53
}
54
55
template
<
class
T>
56
const
T&
57
get
()
const
58
{
59
return
static_cast<
const
wrap<T>&
>
(*this).value_;
60
}
61
62
template
<
int
N>
63
typename
boost::mpl::at_c<Vector, N>::type&
64
get
()
65
{
66
typedef
typename
boost::mpl::at_c<Vector, N>::type T;
67
return
static_cast<
wrap<T>&
>
(*this).value_;
68
}
69
70
template
<
int
N>
71
const
typename
boost::mpl::at_c<Vector, N>::type&
72
get
()
const
73
{
74
typedef
typename
boost::mpl::at_c<Vector, N>::type T;
75
return
static_cast<
const
wrap<T>&
>
(*this).value_;
76
}
77
};
78
79
}
// detail
80
}
// ndnSIM
81
}
// ndn
82
}
// ns3
83
85
86
#endif // MULTI_TYPE_CONTAINER_H_
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ndnSIM
ndnSIM
utils
trie
detail
multi-type-container.hpp
Generated on Sat Nov 12 2016 16:02:55 for ndnSIM by
1.8.12