|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
42 .SetGroupName (
"TopologyReader")
142 NS_ASSERT_MSG (m_linkAttr.find (name) != m_linkAttr.end (),
"Requested topology link attribute not found");
143 return m_linkAttr.find (name)->second;
149 if ( m_linkAttr.find (name) == m_linkAttr.end () )
153 value = m_linkAttr.find (name)->second;
160 m_linkAttr[name] = value;
166 return m_linkAttr.begin ();
171 return m_linkAttr.end ();
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual ~TopologyReader()
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< Node > GetToNode(void) const
Returns a Ptr<Node> to the "to" node of the link.
std::string GetAttribute(const std::string &name) const
Returns the value of a link attribute.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Inner class holding the details about a link between two nodes.
std::map< std::string, std::string >::const_iterator ConstAttributesIterator
Constant iterator to scan the map of link attributes.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
ConstLinksIterator LinksEnd(void) const
Returns an iterator to the the last link in this block.
Ptr< Node > GetFromNode(void) const
Returns a Ptr<Node> to the "from" node of the link.
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.
void SetFileName(const std::string &fileName)
Sets the input file name.
void SetAttribute(const std::string &name, const std::string &value)
Sets an arbitrary link attribute.
std::string GetToNodeName(void) const
Returns the name of the "to" node of the link.
A base class which provides memory management and object aggregation.
bool GetAttributeFailSafe(const std::string &name, std::string &value) const
Returns the value of a link attribute.
Ptr< Node > m_fromPtr
The node the links originates from.
std::string m_fileName
The name of the input file.
std::string m_toName
Name of the node the links is directed to.
static TypeId GetTypeId(void)
Get the type ID.
ns3::TopologyReader declaration.
bool LinksEmpty(void) const
Checks if the block contains any links.
std::list< Link > m_linksList
The container of the links between the nodes.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
ConstAttributesIterator AttributesEnd(void) const
Returns an iterator to the end of the attributes.
std::list< Link >::const_iterator ConstLinksIterator
Constant iterator to the list of the links.
Ptr< Node > m_toPtr
The node the links is directed to.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
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 m_fromName
Name of the node the links originates from.
ConstAttributesIterator AttributesBegin(void) const
Returns an iterator to the begin of the attributes.
int LinksSize(void) const
Returns the number of links in this block.