A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
queue-disc-container.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Universita' degli Studi di Napoli Federico II
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Stefano Avallone <stavallo@unina.it>
18 */
19
20#ifndef QUEUE_DISC_CONTAINER_H
21#define QUEUE_DISC_CONTAINER_H
22
23#include "ns3/queue-disc.h"
24
25#include <stdint.h>
26#include <vector>
27
28namespace ns3
29{
30
46{
47 public:
49 typedef std::vector<Ptr<QueueDisc>>::const_iterator ConstIterator;
50
55
63
83 ConstIterator Begin() const;
84
104 ConstIterator End() const;
105
126 std::size_t GetN() const;
127
149 Ptr<QueueDisc> Get(std::size_t i) const;
150
157 void Add(QueueDiscContainer other);
158
164 void Add(Ptr<QueueDisc> qDisc);
165
166 private:
167 std::vector<Ptr<QueueDisc>> m_queueDiscs;
168};
169
170} // namespace ns3
171
172#endif /* QUEUE_DISC_CONTAINER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
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.