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
buffer.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24
#include "
buffer.hpp
"
25
26
namespace
ndn
{
27
28
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
29
static_assert(std::is_nothrow_move_constructible<Buffer>::value,
30
"Buffer must be MoveConstructible with noexcept"
);
31
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE
32
33
#if NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
34
static_assert(std::is_nothrow_move_assignable<Buffer>::value,
35
"Buffer must be MoveAssignable with noexcept"
);
36
#endif // NDN_CXX_HAVE_IS_NOTHROW_MOVE_ASSIGNABLE
37
38
Buffer::Buffer
()
39
{
40
}
41
42
Buffer::Buffer
(
size_t
size)
43
:
std
::vector<uint8_t>(size, 0)
44
{
45
}
46
47
Buffer::Buffer
(
const
void
*
buf
,
size_t
length)
48
:
std
::vector<uint8_t>(reinterpret_cast<const uint8_t*>(buf),
49
reinterpret_cast<const uint8_t*>(buf) + length)
50
{
51
}
52
53
}
// namespace ndn
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::Buffer::Buffer
Buffer()
Creates an empty buffer.
Definition:
buffer.cpp:38
std
STL namespace.
ndn::Buffer::buf
uint8_t * buf()
Definition:
buffer.hpp:87
buffer.hpp
ndnSIM
ndn-cxx
src
encoding
buffer.cpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12