Holds a vector of ns3::QueueDisc pointers. More...
#include "queue-disc-container.h"
Public Types | |
typedef std::vector< Ptr< QueueDisc > >::const_iterator | ConstIterator |
QueueDisc container const iterator. More... | |
Public Member Functions | |
QueueDiscContainer () | |
Create an empty QueueDiscContainer. More... | |
QueueDiscContainer (Ptr< QueueDisc > qDisc) | |
void | Add (Ptr< QueueDisc > qDisc) |
Append a single Ptr<QueueDisc> to this container. More... | |
void | Add (QueueDiscContainer other) |
Append the contents of another QueueDiscContainer to the end of this container. More... | |
ConstIterator | Begin (void) const |
Get a const iterator which refers to the first QueueDisc in the container. More... | |
ConstIterator | End (void) const |
Get a const iterator which indicates past-the-last QueueDisc in the container. More... | |
Ptr< QueueDisc > | Get (std::size_t i) const |
Get the Ptr<QueueDisc> stored in this container at a given index. More... | |
std::size_t | GetN (void) const |
Get the number of Ptr<QueueDisc> stored in this container. More... | |
Private Attributes | |
std::vector< Ptr< QueueDisc > > | m_queueDiscs |
QueueDiscs smart pointers. More... | |
Holds a vector of ns3::QueueDisc pointers.
Typically ns-3 QueueDiscs are installed on net devices using a traffic control helper. The helper Install method takes a NetDeviceContainer which holds some number of Ptr<NetDevice>. For each of the net devices in the NetDeviceContainer the helper will instantiate a queue disc and install it to the net device. For each of the queue discs, the helper also adds the queue disc into a Container for later use by the caller. This is that container used to hold the Ptr<QueueDisc> which are instantiated by the traffic control helper.
Definition at line 44 of file queue-disc-container.h.
typedef std::vector<Ptr<QueueDisc> >::const_iterator ns3::QueueDiscContainer::ConstIterator |
QueueDisc container const iterator.
Definition at line 48 of file queue-disc-container.h.
ns3::QueueDiscContainer::QueueDiscContainer | ( | ) |
Create an empty QueueDiscContainer.
Definition at line 25 of file queue-disc-container.cc.
qDisc | a queue disc to add to the container |
Create a QueueDiscContainer with exactly one queue disc that has previously been instantiated
Definition at line 29 of file queue-disc-container.cc.
References m_queueDiscs.
Append a single Ptr<QueueDisc> to this container.
qDisc | The Ptr<QueueDisc> to append. |
Definition at line 68 of file queue-disc-container.cc.
References m_queueDiscs.
void ns3::QueueDiscContainer::Add | ( | QueueDiscContainer | other | ) |
Append the contents of another QueueDiscContainer to the end of this container.
other | The QueueDiscContainer to append. |
Definition at line 59 of file queue-disc-container.cc.
References Begin(), End(), and m_queueDiscs.
Referenced by ns3::TrafficControlHelper::Install().
QueueDiscContainer::ConstIterator ns3::QueueDiscContainer::Begin | ( | void | ) | const |
Get a const iterator which refers to the first QueueDisc in the container.
QueueDiscs can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the iterator method and is typically used in a for-loop to run through the QueueDiscs
Definition at line 35 of file queue-disc-container.cc.
References m_queueDiscs.
Referenced by Add().
QueueDiscContainer::ConstIterator ns3::QueueDiscContainer::End | ( | void | ) | const |
Get a const iterator which indicates past-the-last QueueDisc in the container.
QueueDiscs can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the iterator method and is typically used in a for-loop to run through the QueueDiscs
Definition at line 41 of file queue-disc-container.cc.
References m_queueDiscs.
Referenced by Add().
Get the Ptr<QueueDisc> stored in this container at a given index.
QueueDiscs can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the direct method and is used to retrieve the indexed Ptr<QueueDisc>.
i | the index of the requested queue disc pointer. |
Definition at line 53 of file queue-disc-container.cc.
References m_queueDiscs.
Referenced by UdpSocketImplTest::DoRun(), and experiment().
std::size_t ns3::QueueDiscContainer::GetN | ( | void | ) | const |
Get the number of Ptr<QueueDisc> stored in this container.
QueueDiscs can be retrieved from the container in two ways. First, directly by an index into the container, and second, using an iterator. This method is used in the direct method and is typically used to define an ending condition in a for-loop that runs through the stored QueueDiscs
Definition at line 47 of file queue-disc-container.cc.
References m_queueDiscs.
QueueDiscs smart pointers.
Definition at line 166 of file queue-disc-container.h.
Referenced by QueueDiscContainer(), Add(), Begin(), End(), Get(), and GetN().