holds a vector of std::pair of Ptr<QKDControl> and interface index. More...
#include "qkd-control-container.h"
Public Types | |
typedef std::vector< std::pair< Ptr< QKDControl >, uint32_t > >::const_iterator | Iterator |
Container Const Iterator for pairs of QKDControl smart pointer / Interface Index. More... | |
Public Member Functions | |
QKDControlContainer () | |
Constructor. More... | |
void | Add (const QKDControlContainer &other) |
Concatenate the entries in the other container with ours. More... | |
void | Add (Ptr< QKDControl >, uint32_t ipInterfacePair) |
Manually add an entry to the container consisting of a previously composed entry std::pair. More... | |
void | Add (std::pair< Ptr< QKDControl >, uint32_t > ipInterfacePair) |
Manually add an entry to the container consisting of a previously composed entry std::pair. More... | |
Iterator | Begin (void) const |
Get an iterator which refers to the first pair in the container. More... | |
Iterator | End (void) const |
Get an iterator which indicates past-the-last Node in the container. More... | |
std::pair< Ptr< QKDControl >, uint32_t > | Get (uint32_t i) const |
Get the std::pair of an Ptr<QKDControl> and interface stored at the location specified by the index. More... | |
uint32_t | GetN (void) const |
Get the number of nodes in the container. More... | |
Private Types | |
typedef std::vector< std::pair< Ptr< QKDControl >, uint32_t > > | InterfaceVector |
Container for pairs of QKDControl smart pointer / Interface Index. More... | |
Private Attributes | |
InterfaceVector | m_list |
List of QKD Encryptors and interfaces index. More... | |
holds a vector of std::pair of Ptr<QKDControl> and interface index.
Typically ns-3 QKDControls are installed on nodes using an QKD helper.
Definition at line 40 of file qkd-control-container.h.
|
private |
Container for pairs of QKDControl smart pointer / Interface Index.
Definition at line 136 of file qkd-control-container.h.
typedef std::vector<std::pair<Ptr<QKDControl>, uint32_t> >::const_iterator ns3::QKDControlContainer::Iterator |
Container Const Iterator for pairs of QKDControl smart pointer / Interface Index.
Definition at line 46 of file qkd-control-container.h.
ns3::QKDControlContainer::QKDControlContainer | ( | ) |
Constructor.
Definition at line 27 of file qkd-control-container.cc.
void ns3::QKDControlContainer::Add | ( | const QKDControlContainer & | other | ) |
Concatenate the entries in the other container with ours.
other | The other container. |
Definition at line 32 of file qkd-control-container.cc.
References m_list.
Referenced by Add(), and ns3::QKDLinkHelper::InstallQKDControl().
void ns3::QKDControlContainer::Add | ( | Ptr< QKDControl > | qkde, |
uint32_t | ipInterfacePair | ||
) |
Manually add an entry to the container consisting of a previously composed entry std::pair.
The | QKD control object. |
ipInterfacePair | The pair of a pointer to Ipv4 object and interface index of the Ipv4Interface to add to the container. |
Definition at line 59 of file qkd-control-container.cc.
References m_list.
void ns3::QKDControlContainer::Add | ( | std::pair< Ptr< QKDControl >, uint32_t > | ipInterfacePair | ) |
Manually add an entry to the container consisting of a previously composed entry std::pair.
The | pair of QKD control objects. |
ipInterfacePair | The pair of a pointer to Ipv4 object and interface index of the Ipv4Interface to add to the container. |
Definition at line 63 of file qkd-control-container.cc.
References Add().
QKDControlContainer::Iterator ns3::QKDControlContainer::Begin | ( | void | ) | const |
Get an iterator which refers to the first pair in the container.
Pairs 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 pairs
Definition at line 41 of file qkd-control-container.cc.
References m_list.
QKDControlContainer::Iterator ns3::QKDControlContainer::End | ( | void | ) | const |
Get an iterator which indicates past-the-last Node in the container.
Nodes 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 Nodes
Definition at line 47 of file qkd-control-container.cc.
References m_list.
std::pair< Ptr< QKDControl >, uint32_t > ns3::QKDControlContainer::Get | ( | uint32_t | i | ) | const |
Get the std::pair of an Ptr<QKDControl> and interface stored at the location specified by the index.
i | The index of the container entry to retrieve. |
Definition at line 69 of file qkd-control-container.cc.
References m_list.
uint32_t ns3::QKDControlContainer::GetN | ( | void | ) | const |
Get the number of nodes in the container.
Definition at line 53 of file qkd-control-container.cc.
References m_list.
|
private |