Abstract class to parse Config paths into object references. More...
Public Member Functions | |
Resolver (std::string path) | |
Construct from a base Config path. | |
virtual | ~Resolver () |
Destructor. | |
void | Resolve (Ptr< Object > root) |
Parse the stored Config path into an object reference, beginning at the indicated root object. | |
Private Member Functions | |
void | Canonicalize () |
Ensure the Config path starts and ends with a '/'. | |
void | DoArrayResolve (std::string path, const ObjectPtrContainerValue &vector) |
Parse an index on the Config path. | |
virtual void | DoOne (Ptr< Object > object, std::string path)=0 |
Handle one found object. | |
void | DoResolve (std::string path, Ptr< Object > root) |
Parse the next element in the Config path. | |
void | DoResolveOne (Ptr< Object > object) |
Handle one object found on the path. | |
std::string | GetResolvedPath () const |
Get the current Config path. | |
Private Attributes | |
std::string | m_path |
The Config path. | |
std::vector< std::string > | m_workStack |
Current list of path tokens. | |
Abstract class to parse Config paths into object references.
ns3::Config::Resolver::Resolver | ( | std::string | path | ) |
Construct from a base Config path.
[in] | path | The Config path. |
Definition at line 373 of file config.cc.
References Canonicalize(), and NS_LOG_FUNCTION.
|
virtual |
|
private |
Ensure the Config path starts and ends with a '/'.
Definition at line 386 of file config.cc.
References m_path, and NS_LOG_FUNCTION.
Referenced by Resolver().
|
private |
Parse an index on the Config path.
[in] | path | The remaining Config path. |
[in,out] | vector | The resulting list of matching objects. |
Definition at line 597 of file config.cc.
References DoResolve(), m_workStack, ns3::Config::ArrayMatcher::Matches(), NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by DoResolve().
|
privatepure virtual |
Handle one found object.
[in] | object | The found object. |
[in] | path | The matching Config path context. |
Referenced by DoResolveOne().
Parse the next element in the Config path.
[in] | path | The remaining portion of the Config path. |
[in] | root | The object corresponding to the current position in the Config path. |
Definition at line 436 of file config.cc.
References ns3::TypeId::AttributeInformation::checker, DoArrayResolve(), DoResolve(), DoResolveOne(), ns3::Names::Find(), ns3::PointerValue::Get(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetParent(), GetResolvedPath(), ns3::TypeId::LookupByName(), m_workStack, ns3::TypeId::AttributeInformation::name, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, and ns3::PeekPointer().
Referenced by DoArrayResolve(), DoResolve(), and Resolve().
Handle one object found on the path.
[in] | object | The current object on the Config path. |
Definition at line 427 of file config.cc.
References DoOne(), GetResolvedPath(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by DoResolve().
|
private |
Get the current Config path.
Definition at line 414 of file config.cc.
References m_workStack, and NS_LOG_FUNCTION.
Referenced by DoResolve(), and DoResolveOne().
Parse the stored Config path into an object reference, beginning at the indicated root object.
[in] | root | The object corresponding to the current position in in the Config path. |
Definition at line 406 of file config.cc.
References DoResolve(), m_path, and NS_LOG_FUNCTION.
|
private |
The Config path.
Definition at line 369 of file config.cc.
Referenced by Canonicalize(), and Resolve().
|
private |
Current list of path tokens.
Definition at line 367 of file config.cc.
Referenced by DoArrayResolve(), DoResolve(), and GetResolvedPath().