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
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 Thu Nov 2 2017 03:30:30 for ndnSIM by
1.8.11