Public Types | Public Member Functions

ns3::TopologyReader::Link Class Reference
[Topology Input Readers]

Inner class holding the details about a link between two nodes. More...

#include <topology-reader.h>

Collaboration diagram for ns3::TopologyReader::Link:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::map< std::string,
std::string >::const_iterator 
ConstAttributesIterator

Public Member Functions

 Link (Ptr< Node > fromPtr, std::string fromName, Ptr< Node > toPtr, std::string toName)
Ptr< NodeGetFromNode (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< NodeGetToNode (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 (std::string name)
 Returns the value of a link attribute. The attribute must exist.
bool GetAttributeFailSafe (std::string name, std::string &value)
 Returns the value of a link attribute.
void SetAttribute (std::string name, 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.

Detailed Description

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.


Member Function Documentation

ConstAttributesIterator ns3::TopologyReader::Link::AttributesBegin ( void   ) 

Returns an iterator to the begin of the attributes.

Returns:
a const iterator to the first attribute of a link.
ConstAttributesIterator ns3::TopologyReader::Link::AttributesEnd ( void   ) 

Returns an iterator to the end of the attributes.

Returns:
a const iterator to the last attribute of a link.
std::string ns3::TopologyReader::Link::GetAttribute ( std::string  name  ) 

Returns the value of a link attribute. The attribute must exist.

Parameters:
name the name of the attribute
Returns:
the value of the attribute
bool ns3::TopologyReader::Link::GetAttributeFailSafe ( std::string  name,
std::string &  value 
)

Returns the value of a link attribute.

Parameters:
name the name of the attribute
value the value of the attribute
Returns:
true if the attribute was defined, false otherwise.
Ptr<Node> ns3::TopologyReader::Link::GetFromNode ( void   )  const

Returns a Ptr<Node> to the "from" node of the link.

Returns:
a Ptr<Node> to the "from" node of the link
std::string ns3::TopologyReader::Link::GetFromNodeName ( void   )  const

Returns the name of the "from" node of the link.

Returns:
the name of the "from" node of the link
Ptr<Node> ns3::TopologyReader::Link::GetToNode ( void   )  const

Returns a Ptr<Node> to the "to" node of the link.

Returns:
a Ptr<Node> to the "to" node of the link
std::string ns3::TopologyReader::Link::GetToNodeName ( void   )  const

Returns the name of the "to" node of the link.

Returns:
the name of the "to" node of the link
void ns3::TopologyReader::Link::SetAttribute ( std::string  name,
std::string &  value 
)

Sets an arbitrary link attribute.

Parameters:
name the name of the attribute
value the value of the attribute

The documentation for this class was generated from the following file: