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
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
h
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
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
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
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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
ndn::security::transform::BoolSink::BoolSink
BoolSink(bool &value)
Create a bool sink whose output will be stored in value.
Definition:
bool-sink.cpp:28
ndn::security::transform::boolSink
unique_ptr< Sink > boolSink(bool &value)
Definition:
bool-sink.cpp:51
security
bool-sink.hpp
ndnSIM
ndn-cxx
src
security
transform
bool-sink.cpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13