Inner class holding the details about a link between two nodes. More...
#include "topology-reader.h"
Public Types | |
typedef std::map< std::string, std::string >::const_iterator | ConstAttributesIterator |
Constant iterator to scan the map of link attributes. More... | |
Public Member Functions | |
Link (Ptr< Node > fromPtr, const std::string &fromName, Ptr< Node > toPtr, const std::string &toName) | |
Constructor. More... | |
ConstAttributesIterator | AttributesBegin (void) const |
Returns an iterator to the begin of the attributes. More... | |
ConstAttributesIterator | AttributesEnd (void) const |
Returns an iterator to the end of the attributes. More... | |
std::string | GetAttribute (const std::string &name) const |
Returns the value of a link attribute. More... | |
bool | GetAttributeFailSafe (const std::string &name, std::string &value) const |
Returns the value of a link attribute. More... | |
Ptr< Node > | GetFromNode (void) const |
Returns a Ptr<Node> to the "from" node of the link. More... | |
std::string | GetFromNodeName (void) const |
Returns the name of the "from" node of the link. More... | |
Ptr< Node > | GetToNode (void) const |
Returns a Ptr<Node> to the "to" node of the link. More... | |
std::string | GetToNodeName (void) const |
Returns the name of the "to" node of the link. More... | |
void | SetAttribute (const std::string &name, const std::string &value) |
Sets an arbitrary link attribute. More... | |
Private Member Functions | |
Link () | |
Private Attributes | |
std::string | m_fromName |
Name of the node the links originates from. More... | |
Ptr< Node > | m_fromPtr |
The node the links originates from. More... | |
std::map< std::string, std::string > | m_linkAttr |
Container of the link attributes (if any). More... | |
std::string | m_toName |
Name of the node the links is directed to. More... | |
Ptr< Node > | m_toPtr |
The node the links is directed to. More... | |
Inner class holding the details about a link between two nodes.
The link is not described in terms of technology. Rather it is only stating an association between two nodes. The nodes are characterized also with names reflecting how the nodes are called in the original topology file.
Definition at line 61 of file topology-reader.h.
typedef std::map<std::string, std::string>::const_iterator ns3::TopologyReader::Link::ConstAttributesIterator |
Constant iterator to scan the map of link attributes.
Definition at line 67 of file topology-reader.h.
ns3::TopologyReader::Link::Link | ( | Ptr< Node > | fromPtr, |
const std::string & | fromName, | ||
Ptr< Node > | toPtr, | ||
const std::string & | toName | ||
) |
Constructor.
[in] | fromPtr | Ptr to the node the link is originating from. |
[in] | fromName | Name of the node the link is originating from. |
[in] | toPtr | Ptr to the node the link is directed to. |
[in] | toName | Name of the node the link is directed to. |
Definition at line 103 of file topology-reader.cc.
References m_fromName, m_fromPtr, m_toName, and m_toPtr.
|
private |
Definition at line 111 of file topology-reader.cc.
TopologyReader::Link::ConstAttributesIterator ns3::TopologyReader::Link::AttributesBegin | ( | void | ) | const |
Returns an iterator to the begin of the attributes.
Definition at line 164 of file topology-reader.cc.
TopologyReader::Link::ConstAttributesIterator ns3::TopologyReader::Link::AttributesEnd | ( | void | ) | const |
Returns an iterator to the end of the attributes.
Definition at line 169 of file topology-reader.cc.
std::string ns3::TopologyReader::Link::GetAttribute | ( | const std::string & | name | ) | const |
Returns the value of a link attribute.
The attribute must exist.
[in] | name | the name of the attribute. |
Definition at line 140 of file topology-reader.cc.
References NS_ASSERT_MSG.
bool ns3::TopologyReader::Link::GetAttributeFailSafe | ( | const std::string & | name, |
std::string & | value | ||
) | const |
Returns the value of a link attribute.
[in] | name | The name of the attribute. |
[out] | value | The value of the attribute. |
Definition at line 147 of file topology-reader.cc.
Returns a Ptr<Node> to the "from" node of the link.
Definition at line 116 of file topology-reader.cc.
std::string ns3::TopologyReader::Link::GetFromNodeName | ( | void | ) | const |
Returns the name of the "from" node of the link.
Definition at line 122 of file topology-reader.cc.
Returns a Ptr<Node> to the "to" node of the link.
Definition at line 128 of file topology-reader.cc.
std::string ns3::TopologyReader::Link::GetToNodeName | ( | void | ) | const |
Returns the name of the "to" node of the link.
Definition at line 134 of file topology-reader.cc.
void ns3::TopologyReader::Link::SetAttribute | ( | const std::string & | name, |
const std::string & | value | ||
) |
Sets an arbitrary link attribute.
[in] | name | The name of the attribute. |
[in] | value | The value of the attribute. |
Definition at line 158 of file topology-reader.cc.
Referenced by ns3::InetTopologyReader::Read().
|
private |
Name of the node the links originates from.
Definition at line 131 of file topology-reader.h.
Referenced by Link().
The node the links originates from.
Definition at line 132 of file topology-reader.h.
Referenced by Link().
|
private |
Container of the link attributes (if any).
Definition at line 135 of file topology-reader.h.
|
private |
Name of the node the links is directed to.
Definition at line 133 of file topology-reader.h.
Referenced by Link().
The node the links is directed to.
Definition at line 134 of file topology-reader.h.
Referenced by Link().