A Discrete-Event Network Simulator
API
queue-disc-container.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Universita' degli Studi di Napoli Federico II
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Stefano Avallone <stavallo@unina.it>
19  */
20 
21 #ifndef QUEUE_DISC_CONTAINER_H
22 #define QUEUE_DISC_CONTAINER_H
23 
24 #include <stdint.h>
25 #include <vector>
26 #include "ns3/queue-disc.h"
27 
28 namespace ns3 {
29 
45 {
46 public:
48  typedef std::vector<Ptr<QueueDisc> >::const_iterator ConstIterator;
49 
54 
62 
82  ConstIterator Begin (void) const;
83 
103  ConstIterator End (void) const;
104 
125  std::size_t GetN (void) const;
126 
148  Ptr<QueueDisc> Get (std::size_t i) const;
149 
156  void Add (QueueDiscContainer other);
157 
163  void Add (Ptr<QueueDisc> qDisc);
164 
165 private:
166  std::vector<Ptr<QueueDisc> > m_queueDiscs;
167 };
168 
169 } // namespace ns3
170 
171 #endif /* QUEUE_DISC_CONTAINER_H */
std::vector< Ptr< QueueDisc > > m_queueDiscs
QueueDiscs smart pointers.
ConstIterator End(void) const
Get a const iterator which indicates past-the-last QueueDisc in the container.
QueueDiscContainer()
Create an empty QueueDiscContainer.
std::size_t GetN(void) const
Get the number of Ptr<QueueDisc> stored in this container.
std::vector< Ptr< QueueDisc > >::const_iterator ConstIterator
QueueDisc container const iterator.
Holds a vector of ns3::QueueDisc pointers.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< QueueDisc > Get(std::size_t i) const
Get the Ptr<QueueDisc> stored in this container at a given index.
void Add(QueueDiscContainer other)
Append the contents of another QueueDiscContainer to the end of this container.
ConstIterator Begin(void) const
Get a const iterator which refers to the first QueueDisc in the container.