NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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 Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13