The singleton root Names object. More...
Public Member Functions | |
NamesPriv () | |
Constructor. More... | |
~NamesPriv () | |
Destructor. More... | |
bool | Add (std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(std::string,Ptr<Object>) More... | |
bool | Add (std::string path, std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(std::string,std::string,Ptr<Object>) More... | |
bool | Add (Ptr< Object > context, std::string name, Ptr< Object > object) |
Internal implementation for Names::Add(Ptr<Object>,std::string,Ptr<Object>) More... | |
void | Clear (void) |
Internal implementation for Names::Clear() More... | |
Ptr< Object > | Find (std::string path) |
Internal implementation for ns3::Names::Find(std::string) More... | |
Ptr< Object > | Find (std::string path, std::string name) |
Internal implementation for ns3::Names::Find(std::string,std::string) More... | |
Ptr< Object > | Find (Ptr< Object > context, std::string name) |
Internal implementation for ns3::Names::Find(Ptr<Object>,std::string) More... | |
std::string | FindName (Ptr< Object > object) |
Internal implementation for Names::FindName() More... | |
std::string | FindPath (Ptr< Object > object) |
Internal implementation of Names::FindPath() More... | |
bool | Rename (std::string oldpath, std::string newname) |
Internal implementation for Names::Rename(std::string,std::string) More... | |
bool | Rename (std::string path, std::string oldname, std::string newname) |
Internal implementation for Names::Rename(std::string,std::string,std::string) More... | |
bool | Rename (Ptr< Object > context, std::string oldname, std::string newname) |
Internal implementation for Names::Rename(Ptr<Object>,std::string,std::string) More... | |
Private Member Functions | |
bool | IsDuplicateName (NameNode *node, std::string name) |
Check if a name already exists as a child of a NameNode. More... | |
NameNode * | IsNamed (Ptr< Object > object) |
Check if an object has a name. More... | |
Private Attributes | |
std::map< Ptr< Object >, NameNode * > | m_objectMap |
Map from object pointers to their NameNodes. More... | |
NameNode | m_root |
The root NameNode. More... | |
Friends | |
class | Names |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::Singleton< NamesPriv > | |
static NamesPriv * | Get (void) |
Get a pointer to the singleton instance. More... | |
ns3::NamesPriv::NamesPriv | ( | ) |
Constructor.
Definition at line 278 of file names.cc.
References ns3::NameNode::m_name, ns3::NameNode::m_object, ns3::NameNode::m_parent, m_root, and NS_LOG_FUNCTION.
ns3::NamesPriv::~NamesPriv | ( | ) |
Destructor.
Definition at line 287 of file names.cc.
References Clear(), ns3::NameNode::m_name, m_root, and NS_LOG_FUNCTION.
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 317 of file names.cc.
References NS_ASSERT_MSG(), and NS_LOG_FUNCTION.
Referenced by ns3::Names::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 379 of file names.cc.
References Add(), Find(), 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 390 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().
void ns3::NamesPriv::Clear | ( | void | ) |
Internal implementation for Names::Clear()
Definition at line 295 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 ns3::Names::Clear(), and ~NamesPriv().
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 593 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(), 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 687 of file names.cc.
References Find(), and NS_LOG_FUNCTION.
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 699 of file names.cc.
References IsNamed(), ns3::NameNode::m_nameMap, m_root, NS_LOG_FUNCTION, and NS_LOG_LOGIC().
Internal implementation for Names::FindName()
[in] | object | A smart pointer to an object for which you want to find its name. |
Definition at line 547 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 565 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 752 of file names.cc.
References ns3::NameNode::m_nameMap, NS_LOG_FUNCTION, and NS_LOG_LOGIC().
Check if an object has a name.
[in] | object | The object to check. |
Definition at line 734 of file names.cc.
References m_objectMap, 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 425 of file names.cc.
References NS_ASSERT_MSG(), and NS_LOG_FUNCTION.
Referenced by 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 489 of file names.cc.
References Find(), NS_LOG_FUNCTION, 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 500 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().
Map from object pointers to their NameNodes.
Definition at line 275 of file names.cc.
Referenced by Add(), Clear(), FindName(), FindPath(), and IsNamed().
|
private |
The root NameNode.
Definition at line 272 of file names.cc.
Referenced by Add(), Clear(), Find(), NamesPriv(), Rename(), and ~NamesPriv().