NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
bool-sink.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
bool-sink.hpp
"
23
24
namespace
ndn
{
25
namespace
security
{
26
namespace
transform
{
27
28
BoolSink::BoolSink
(
bool
&
value
)
29
: m_hasValue(false)
30
, m_value(value)
31
{
32
}
33
34
size_t
35
BoolSink::doWrite(
const
uint8_t* buf,
size_t
size)
36
{
37
if
(!m_hasValue && size > 0) {
38
m_value = (buf[0] != 0);
39
m_hasValue =
true
;
40
}
41
return
size;
42
}
43
44
void
45
BoolSink::doEnd()
46
{
47
// nothing to do.
48
}
49
50
unique_ptr<Sink>
51
boolSink
(
bool
&
value
)
52
{
53
return
make_unique<BoolSink>(
value
);
54
}
55
56
}
// namespace transform
57
}
// namespace security
58
}
// namespace ndn
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
ndn::security::transform::BoolSink::BoolSink
BoolSink(bool &value)
Create a bool sink whose output will be stored in value.
Definition:
bool-sink.cpp:28
transform
websocketpp::session::state::value
value
Definition:
connection.hpp:179
ndn::security::transform::boolSink
unique_ptr< Sink > boolSink(bool &value)
Definition:
bool-sink.cpp:51
bool-sink.hpp
ndnSIM
ndn-cxx
src
security
transform
bool-sink.cpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11