The singleton root Names object. More...
Public Member Functions | |
NamesPriv () | |
Constructor. | |
~NamesPriv () override | |
Destructor. | |
bool | Add (Ptr< Object > context, std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(Ptr<Object>,std::string,Ptr<Object>) | |
bool | Add (std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(std::string,Ptr<Object>) | |
bool | Add (std::string path, std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(std::string,std::string,Ptr<Object>) | |
void | Clear () |
Internal implementation for Names::Clear() | |
Ptr< Object > | Find (Ptr< Object > context, std::string name) |
Internal implementation for ns3::Names::Find(Ptr<Object>,std::string) | |
Ptr< Object > | Find (std::string path) |
Internal implementation for ns3::Names::Find(std::string) | |
Ptr< Object > | Find (std::string path, std::string name) |
Internal implementation for ns3::Names::Find(std::string,std::string) | |
std::string | FindName (Ptr< Object > object) |
Internal implementation for Names::FindName() | |
std::string | FindPath (Ptr< Object > object) |
Internal implementation of Names::FindPath() | |
bool | Rename (Ptr< Object > context, std::string oldname, std::string newname) |
Internal implementation for Names::Rename(Ptr<Object>,std::string,std::string) | |
bool | Rename (std::string oldpath, std::string newname) |
Internal implementation for Names::Rename(std::string,std::string) | |
bool | Rename (std::string path, std::string oldname, std::string newname) |
Internal implementation for Names::Rename(std::string,std::string,std::string) | |
Public Member Functions inherited from ns3::Singleton< NamesPriv > | |
Singleton (const Singleton< NamesPriv > &)=delete | |
Singleton & | operator= (const Singleton< NamesPriv > &)=delete |
Private Member Functions | |
bool | IsDuplicateName (NameNode *node, std::string name) |
Check if a name already exists as a child of a NameNode. | |
NameNode * | IsNamed (Ptr< Object > object) |
Check if an object has a name. | |
Private Attributes | |
std::map< Ptr< Object >, NameNode * > | m_objectMap |
Map from object pointers to their NameNodes. | |
NameNode | m_root |
The root NameNode. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::Singleton< NamesPriv > | |
static NamesPriv * | Get () |
Get a pointer to the singleton instance. | |
Protected Member Functions inherited from ns3::Singleton< NamesPriv > | |
Singleton () | |
Constructor. | |
virtual | ~Singleton () |
Destructor. | |
ns3::NamesPriv::NamesPriv | ( | ) |
Constructor.
Definition at line 271 of file names.cc.
References ns3::NameNode::m_name, ns3::NameNode::m_object, ns3::NameNode::m_parent, m_root, and NS_LOG_FUNCTION.
|
override |
Destructor.
Definition at line 280 of file names.cc.
References Clear(), ns3::NameNode::m_name, m_root, and NS_LOG_FUNCTION.
Internal implementation for Names::Add(Ptr<Object>,std::string,Ptr<Object>)
[in] | context | A smart pointer to an object that is used in place of the path under which you want this new name to be defined. |
[in] | name | The name of the object you want to associate. |
[in] | object | A smart pointer to the object itself. |
true
if the object was named successfully. Definition at line 384 of file names.cc.
References IsDuplicateName(), IsNamed(), ns3::NameNode::m_nameMap, m_objectMap, m_root, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Internal implementation for Names::Add(std::string,Ptr<Object>)
[in] | name | The name of the object you want to associate; which may be prepended with a path to that object. |
[in] | object | A smart pointer to the object itself. |
true
if the object was named successfully. Definition at line 310 of file names.cc.
References Add(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by ns3::Names::Add(), ns3::Names::Add(), ns3::Names::Add(), Add(), and Add().
Internal implementation for Names::Add(std::string,std::string,Ptr<Object>)
[in] | path | A path name describing a previously named object under which you want this new name to be defined. |
[in] | name | The name of the object you want to associate. |
[in] | object | A smart pointer to the object itself. |
true
if the object was named successfully. Definition at line 373 of file names.cc.
References Add(), Find(), and NS_LOG_FUNCTION.
void ns3::NamesPriv::Clear | ( | ) |
Internal implementation for Names::Clear()
Definition at line 288 of file names.cc.
References ns3::NameNode::m_name, ns3::NameNode::m_nameMap, ns3::NameNode::m_object, m_objectMap, ns3::NameNode::m_parent, m_root, and NS_LOG_FUNCTION.
Referenced by ~NamesPriv(), and ns3::Names::Clear().
Internal implementation for ns3::Names::Find(Ptr<Object>,std::string)
[in] | context | A smart pointer to an object that is used in place of the path under which you want this new name to be defined. |
[in] | name | A string containing a name to search for. |
Definition at line 693 of file names.cc.
References IsNamed(), ns3::NameNode::m_nameMap, m_root, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Internal implementation for ns3::Names::Find(std::string)
[in] | path | A string containing a name space path used to locate the object. |
Definition at line 587 of file names.cc.
References ns3::NameNode::m_nameMap, m_root, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by Add(), Find(), ns3::Names::FindInternal(), ns3::Names::FindInternal(), ns3::Names::FindInternal(), and Rename().
Internal implementation for ns3::Names::Find(std::string,std::string)
[in] | path | A path name describing a previously named object under which you want to look for the specified name. |
[in] | name | A string containing a name to search for. |
Definition at line 681 of file names.cc.
References Find(), and NS_LOG_FUNCTION.
Internal implementation for Names::FindName()
[in] | object | A smart pointer to an object for which you want to find its name. |
Definition at line 542 of file names.cc.
References m_objectMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::Names::FindName().
Internal implementation of Names::FindPath()
[in] | object | A smart pointer to an object for which you want to find its fullname. |
Definition at line 560 of file names.cc.
References ns3::NameNode::m_name, m_objectMap, ns3::NameNode::m_parent, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::Names::FindPath().
|
private |
Check if a name already exists as a child of a NameNode.
[in] | node | The node to search. |
[in] | name | The name to search for. |
true
if name
already exists as a child of node
. Definition at line 746 of file names.cc.
References ns3::NameNode::m_nameMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by Add(), and Rename().
Check if an object has a name.
[in] | object | The object to check. |
Definition at line 728 of file names.cc.
References m_objectMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by Add(), Find(), and Rename().
Internal implementation for Names::Rename(Ptr<Object>,std::string,std::string)
[in] | context | A smart pointer to an object that is used in place of the path under which you want this new name to be defined. |
[in] | oldname | The current shortname of the object you want to change. |
[in] | newname | The new shortname of the object you want to change. |
true
if the object was renamed successfully. Definition at line 495 of file names.cc.
References IsDuplicateName(), IsNamed(), ns3::NameNode::m_name, ns3::NameNode::m_nameMap, m_root, NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
bool ns3::NamesPriv::Rename | ( | std::string | oldpath, |
std::string | newname ) |
Internal implementation for Names::Rename(std::string,std::string)
[in] | oldpath | The current path name to the object you want to change. |
[in] | newname | The new name of the object you want to change. |
true
if the object was renamed successfully. Definition at line 419 of file names.cc.
References NS_ASSERT_MSG, NS_LOG_FUNCTION, and Rename().
Referenced by ns3::Names::Rename(), ns3::Names::Rename(), ns3::Names::Rename(), Rename(), and Rename().
bool ns3::NamesPriv::Rename | ( | std::string | path, |
std::string | oldname, | ||
std::string | newname ) |
Internal implementation for Names::Rename(std::string,std::string,std::string)
[in] | path | A path name describing a previously named object under which you want this name change to occur (cf. directory). |
[in] | oldname | The currently defined name of the object. |
[in] | newname | The new name you want the object to have. |
true
if the object was renamed successfully. Definition at line 484 of file names.cc.
References Find(), NS_LOG_FUNCTION, and Rename().
Map from object pointers to their NameNodes.
Definition at line 268 of file names.cc.
Referenced by Add(), Clear(), FindName(), FindPath(), and IsNamed().
|
private |
The root NameNode.
Definition at line 265 of file names.cc.
Referenced by NamesPriv(), ~NamesPriv(), Add(), Clear(), Find(), Find(), and Rename().