A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
queue-disc-container.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
10
11namespace ns3
12{
13
17
22
25{
26 return m_queueDiscs.begin();
27}
28
31{
32 return m_queueDiscs.end();
33}
34
35std::size_t
37{
38 return m_queueDiscs.size();
39}
40
42QueueDiscContainer::Get(std::size_t i) const
43{
44 return m_queueDiscs[i];
45}
46
47void
49{
50 for (auto i = other.Begin(); i != other.End(); i++)
51 {
52 m_queueDiscs.push_back(*i);
53 }
54}
55
56void
58{
59 m_queueDiscs.push_back(qDisc);
60}
61
62} // namespace ns3
Smart pointer class similar to boost::intrusive_ptr.
Holds a vector of ns3::QueueDisc pointers.
void Add(QueueDiscContainer other)
Append the contents of another QueueDiscContainer to the end of this container.
std::vector< Ptr< QueueDisc > > m_queueDiscs
QueueDiscs smart pointers.
QueueDiscContainer()
Create an empty QueueDiscContainer.
ConstIterator Begin() const
Get a const iterator which refers to the first QueueDisc in the container.
ConstIterator End() const
Get a const iterator which indicates past-the-last QueueDisc in the container.
std::vector< Ptr< QueueDisc > >::const_iterator ConstIterator
QueueDisc container const iterator.
Ptr< QueueDisc > Get(std::size_t i) const
Get the Ptr<QueueDisc> stored in this container at a given index.
std::size_t GetN() const
Get the number of Ptr<QueueDisc> stored in this container.
Every class exported by the ns3 library is enclosed in the ns3 namespace.