22 #ifndef TOPOLOGY_READER_H 23 #define TOPOLOGY_READER_H 29 #include "ns3/object.h" 30 #include "ns3/node-container.h" 96 std::string
GetAttribute (
const std::string &name)
const;
110 void SetAttribute (
const std::string &name,
const std::string &value);
ConstAttributesIterator AttributesBegin(void) const
Returns an iterator to the begin of the attributes.
static TypeId GetTypeId(void)
Get the type ID.
std::list< Link > m_linksList
The container of the links between the nodes.
TopologyReader & operator=(const TopologyReader &)
Copy constructor.
void AddLink(Link link)
Adds a link to the topology.
virtual ~TopologyReader()
Inner class holding the details about a link between two nodes.
Interface for input file readers management.
std::string GetFromNodeName(void) const
Returns the name of the "from" node of the link.
ConstLinksIterator LinksEnd(void) const
Returns an iterator to the the last link in this block.
std::map< std::string, std::string > m_linkAttr
Container of the link attributes (if any).
ConstAttributesIterator AttributesEnd(void) const
Returns an iterator to the end of the attributes.
bool LinksEmpty(void) const
Checks if the block contains any links.
void SetFileName(const std::string &fileName)
Sets the input file name.
std::string GetAttribute(const std::string &name) const
Returns the value of a link attribute.
int LinksSize(void) const
Returns the number of links in this block.
std::list< Link >::const_iterator ConstLinksIterator
Constant iterator to the list of the links.
Ptr< Node > GetToNode(void) const
Returns a Ptr<Node> to the "to" node of the link.
std::map< std::string, std::string >::const_iterator ConstAttributesIterator
Constant iterator to scan the map of link attributes.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
std::string m_fileName
The name of the input file.
Ptr< Node > m_toPtr
The node the links is directed to.
void SetAttribute(const std::string &name, const std::string &value)
Sets an arbitrary link attribute.
std::string m_fromName
Name of the node the links originates from.
std::string m_toName
Name of the node the links is directed to.
std::string GetFileName(void) const
Returns the input file name.
virtual NodeContainer Read(void)=0
Main topology reading function.
bool GetAttributeFailSafe(const std::string &name, std::string &value) const
Returns the value of a link attribute.
A base class which provides memory management and object aggregation.
Ptr< Node > m_fromPtr
The node the links originates from.
a unique identifier for an interface.
ConstLinksIterator LinksBegin(void) const
Returns an iterator to the the first link in this block.
Ptr< Node > GetFromNode(void) const
Returns a Ptr<Node> to the "from" node of the link.
std::string GetToNodeName(void) const
Returns the name of the "to" node of the link.