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