A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
9
#include "
queue-disc-container.h
"
10
11
namespace
ns3
12
{
13
14
QueueDiscContainer::QueueDiscContainer
()
15
{
16
}
17
18
QueueDiscContainer::QueueDiscContainer
(
Ptr<QueueDisc>
qDisc)
19
{
20
m_queueDiscs
.push_back(qDisc);
21
}
22
23
QueueDiscContainer::ConstIterator
24
QueueDiscContainer::Begin
()
const
25
{
26
return
m_queueDiscs
.begin();
27
}
28
29
QueueDiscContainer::ConstIterator
30
QueueDiscContainer::End
()
const
31
{
32
return
m_queueDiscs
.end();
33
}
34
35
std::size_t
36
QueueDiscContainer::GetN
()
const
37
{
38
return
m_queueDiscs
.size();
39
}
40
41
Ptr<QueueDisc>
42
QueueDiscContainer::Get
(std::size_t i)
const
43
{
44
return
m_queueDiscs
[i];
45
}
46
47
void
48
QueueDiscContainer::Add
(
QueueDiscContainer
other)
49
{
50
for
(
auto
i = other.
Begin
(); i != other.
End
(); i++)
51
{
52
m_queueDiscs
.push_back(*i);
53
}
54
}
55
56
void
57
QueueDiscContainer::Add
(
Ptr<QueueDisc>
qDisc)
58
{
59
m_queueDiscs
.push_back(qDisc);
60
}
61
62
}
// namespace ns3
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::QueueDiscContainer
Holds a vector of ns3::QueueDisc pointers.
Definition
queue-disc-container.h:35
ns3::QueueDiscContainer::Add
void Add(QueueDiscContainer other)
Append the contents of another QueueDiscContainer to the end of this container.
Definition
queue-disc-container.cc:48
ns3::QueueDiscContainer::m_queueDiscs
std::vector< Ptr< QueueDisc > > m_queueDiscs
QueueDiscs smart pointers.
Definition
queue-disc-container.h:156
ns3::QueueDiscContainer::QueueDiscContainer
QueueDiscContainer()
Create an empty QueueDiscContainer.
Definition
queue-disc-container.cc:14
ns3::QueueDiscContainer::Begin
ConstIterator Begin() const
Get a const iterator which refers to the first QueueDisc in the container.
Definition
queue-disc-container.cc:24
ns3::QueueDiscContainer::End
ConstIterator End() const
Get a const iterator which indicates past-the-last QueueDisc in the container.
Definition
queue-disc-container.cc:30
ns3::QueueDiscContainer::ConstIterator
std::vector< Ptr< QueueDisc > >::const_iterator ConstIterator
QueueDisc container const iterator.
Definition
queue-disc-container.h:38
ns3::QueueDiscContainer::Get
Ptr< QueueDisc > Get(std::size_t i) const
Get the Ptr<QueueDisc> stored in this container at a given index.
Definition
queue-disc-container.cc:42
ns3::QueueDiscContainer::GetN
std::size_t GetN() const
Get the number of Ptr<QueueDisc> stored in this container.
Definition
queue-disc-container.cc:36
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
queue-disc-container.h
src
traffic-control
helper
queue-disc-container.cc
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0