22 #ifndef TOPOLOGY_READER_H
23 #define TOPOLOGY_READER_H
29 #include "ns3/object.h"
30 #include "ns3/node-container.h"
98 std::string
GetAttribute (
const std::string &name)
const;
112 void SetAttribute (
const std::string &name,
const std::string &value);
126 std::string m_fromName;
128 std::string m_toName;
130 std::map<std::string, std::string> m_linkAttr;
138 static TypeId GetTypeId (
void);
202 std::string m_fileName;
203 std::list<Link> m_linksList;
Ptr< Node > GetFromNode(void) const
Returns a Ptr<Node> to the "from" node of the link.
ConstLinksIterator LinksBegin(void) const
Returns an iterator to the the first link in this block.
std::string GetFileName(void) const
Returns the input file name.
std::string GetAttribute(const std::string &name) const
Returns the value of a link attribute. The attribute must exist.
bool LinksEmpty(void) const
Checks if the block contains any links.
void AddLink(Link link)
Adds a link to the topology.
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.
Inner class holding the details about a link between two nodes.
Interface for input file readers management.
int LinksSize(void) const
Returns the number of links in this block.
ConstAttributesIterator AttributesBegin(void)
Returns an iterator to the begin of the attributes.
void SetFileName(const std::string &fileName)
Sets the input file name.
std::list< Link >::const_iterator ConstLinksIterator
Constant iterator to the list of the links.
std::map< std::string, std::string >::const_iterator ConstAttributesIterator
Constant iterator to scan the map of link attributes.
keep track of a set of node pointers.
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 AttributesEnd(void)
Returns an iterator to the end of the attributes.
std::string GetToNodeName(void) const
Returns the name of the "to" node of the link.
virtual NodeContainer Read(void)=0
Main topology reading function.
a base class which provides memory management and object aggregation
a unique identifier for an interface.
ConstLinksIterator LinksEnd(void) const
Returns an iterator to the the last link in this block.