NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
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
p
q
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
k
l
n
o
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
f
i
k
l
n
p
q
r
s
t
u
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
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
v
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Enumerations
+
Enumerator
a
c
d
e
i
k
l
m
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
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
f
g
i
k
l
m
n
p
r
s
t
Typedefs
+
Macros
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
batches.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#include "
batches.hpp
"
21
22
namespace
ns3
{
23
24
ATTRIBUTE_HELPER_CPP(
Batches
);
25
26
std::ostream&
27
operator<<
(std::ostream& os,
const
Batches
& batch)
28
{
29
for
(Batches::const_iterator i = batch.begin(); i != batch.end(); i++)
30
os << std::get<0>(*i) <<
" "
<< std::get<1>(*i) <<
" "
;
31
32
return
os;
33
}
34
39
std::istream&
40
operator>>
(std::istream& is,
Batches
& batch)
41
{
42
Time
time
;
43
uint32_t amount;
44
while
(!is.eof()) {
45
is >>
time
>> amount;
46
batch.
Add
(
time
, amount);
47
// std::cout << time << ", " << amount << ". \n";
48
}
49
50
return
is;
51
}
52
}
batches.hpp
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Batches &batch)
Output contents of the Batches to the std::ostream.
Definition:
batches.cpp:27
ndn::time
Definition:
time-custom-clock.hpp:28
ns3::Batches::Add
void Add(const Time &when, uint32_t amount)
Add tuple.
Definition:
batches.hpp:49
ns3::Batches
Class representing sets of (time, number) tuples with support of reading writing to streams...
Definition:
batches.hpp:36
ns3::operator>>
std::istream & operator>>(std::istream &is, Batches &batch)
Read components from input and add them to components.
Definition:
batches.cpp:40
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ndnSIM
utils
batches.cpp
Generated on Tue Aug 7 2018 16:19:18 for ndnSIM by
1.8.14