18 #ifndef OBJECT_NAMES_H
19 #define OBJECT_NAMES_H
115 static void Add(std::string path, std::string name,
Ptr<Object> object);
203 static void Rename(std::string oldpath, std::string newname);
228 static void Rename(std::string path, std::string oldname, std::string newname);
274 static void Rename(
Ptr<Object> context, std::string oldname, std::string newname);
343 template <
typename T>
370 template <
typename T>
371 static Ptr<T> Find(std::string path, std::string name);
413 template <
typename T>
451 template <
typename T>
467 template <
typename T>
483 template <
typename T>
A directory of name and Ptr<Object> associations that allows us to give any ns3 Object a name.
static void Rename(std::string oldpath, std::string newname)
Rename a previously associated name.
static Ptr< Object > FindInternal(std::string path)
Non-templated internal version of Names::Find.
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj.
static Ptr< T > Find(std::string path)
Given a name path string, look to see if there's an object in the system with that associated to it.
static void Clear()
Clear the list of objects associated with names.
static std::string FindName(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and,...
static std::string FindPath(Ptr< Object > object)
Given a pointer to an object, look to see if that object has a name associated with it and return the...
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
ns3::Ptr smart pointer declaration and implementation.