NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
batches.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef _BATCHES_H_
21
#define _BATCHES_H_
22
23
#include "ns3/attribute.h"
24
#include "ns3/attribute-helper.h"
25
#include "ns3/nstime.h"
26
#include <list>
27
#include <tuple>
28
29
namespace
ns3
{
30
36
class
Batches
:
public
std::list<std::tuple<Time, uint32_t>> {
37
public
:
41
Batches
(){};
42
48
void
49
Add
(
const
Time& when, uint32_t amount)
50
{
51
push_back(std::make_tuple(when, amount));
52
}
53
};
54
55
ATTRIBUTE_HELPER_HEADER(
Batches
);
56
62
std::ostream&
63
operator<<
(std::ostream& os,
const
Batches
& batch);
64
69
std::istream&
70
operator>>
(std::istream& is,
Batches
& batch);
71
72
}
// namespace ns3
73
74
#endif // _BATCHES_H_
ns3::Batches
Class representing sets of (time, number) tuples with support of reading writing to streams.
Definition:
batches.hpp:36
ns3::Batches::Add
void Add(const Time &when, uint32_t amount)
Add tuple.
Definition:
batches.hpp:49
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-app-link-service.cpp:32
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Batches &batch)
Output contents of the Batches to the std::ostream.
Definition:
batches.cpp:27
ns3::operator>>
std::istream & operator>>(std::istream &is, Batches &batch)
Read components from input and add them to components.
Definition:
batches.cpp:40
ns3::Batches::Batches
Batches()
Default constructor.
Definition:
batches.hpp:41
ndnSIM
utils
batches.hpp
Generated on Mon Jun 1 2020 22:32:16 for ndnSIM by
1.8.18