ns-3
|
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. |
Public Member Functions | |
Link (Ptr< Node > fromPtr, const std::string &fromName, Ptr< Node > toPtr, const std::string &toName) | |
Constructor. | |
Ptr< Node > | GetFromNode (void) const |
Returns a Ptr<Node> to the "from" node of the link. | |
std::string | GetFromNodeName (void) const |
Returns the name of the "from" node of the link. | |
Ptr< Node > | GetToNode (void) const |
Returns a Ptr<Node> to the "to" node of the link. | |
std::string | GetToNodeName (void) const |
Returns the name of the "to" node of the link. | |
std::string | GetAttribute (const std::string &name) const |
Returns the value of a link attribute. The attribute must exist. | |
bool | GetAttributeFailSafe (const std::string &name, std::string &value) const |
Returns the value of a link attribute. | |
void | SetAttribute (const std::string &name, const std::string &value) |
Sets an arbitrary link attribute. | |
ConstAttributesIterator | AttributesBegin (void) |
Returns an iterator to the begin of the attributes. | |
ConstAttributesIterator | AttributesEnd (void) |
Returns an iterator to the end of the attributes. |
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.
TopologyReader::Link::ConstAttributesIterator ns3::TopologyReader::Link::AttributesBegin | ( | void | ) |
Returns an iterator to the begin of the attributes.
TopologyReader::Link::ConstAttributesIterator ns3::TopologyReader::Link::AttributesEnd | ( | void | ) |
Returns an iterator to the end of the attributes.
std::string ns3::TopologyReader::Link::GetAttribute | ( | const std::string & | name | ) | const |
Returns the value of a link attribute. The attribute must exist.
name | the name of the attribute |
References NS_ASSERT_MSG.
bool ns3::TopologyReader::Link::GetAttributeFailSafe | ( | const std::string & | name, |
std::string & | value | ||
) | const |
Returns the value of a link attribute.
name | the name of the attribute |
value | the value of the attribute |
std::string ns3::TopologyReader::Link::GetFromNodeName | ( | void | ) | const |
Returns the name of the "from" node of the link.
std::string ns3::TopologyReader::Link::GetToNodeName | ( | void | ) | const |
Returns the name of the "to" node of the link.
void ns3::TopologyReader::Link::SetAttribute | ( | const std::string & | name, |
const std::string & | value | ||
) |
Sets an arbitrary link attribute.
name | the name of the attribute |
value | the value of the attribute |
Referenced by ns3::InetTopologyReader::Read().