Abstract class to parse Config paths into object references. More...
Public Member Functions | |
Resolver (std::string path) | |
Construct from a base Config path. More... | |
virtual | ~Resolver () |
Destructor. More... | |
void | Resolve (Ptr< Object > root) |
Parse the stored Config path into an object reference, beginning at the indicated root object. More... | |
Private Member Functions | |
void | Canonicalize () |
Ensure the Config path starts and ends with a '/'. More... | |
void | DoArrayResolve (std::string path, const ObjectPtrContainerValue &vector) |
Parse an index on the Config path. More... | |
virtual void | DoOne (Ptr< Object > object, std::string path)=0 |
Handle one found object. More... | |
void | DoResolve (std::string path, Ptr< Object > root) |
Parse the next element in the Config path. More... | |
void | DoResolveOne (Ptr< Object > object) |
Handle one object found on the path. More... | |
std::string | GetResolvedPath () const |
Get the current Config path. More... | |
Private Attributes | |
std::string | m_path |
The Config path. More... | |
std::vector< std::string > | m_workStack |
Current list of path tokens. More... | |
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 380 of file config.cc.
References Canonicalize(), and NS_LOG_FUNCTION.
|
virtual |
|
private |
Ensure the Config path starts and ends with a '/'.
Definition at line 393 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 604 of file config.cc.
References openflow-switch::container, 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 443 of file config.cc.
References ns3::TypeId::AttributeInformation::checker, DoArrayResolve(), DoResolveOne(), ns3::PointerValue::Get(), ns3::TypeId::GetAttribute(), ns3::ObjectBase::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::Object::GetInstanceTypeId(), ns3::Object::GetObject(), 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(), and Resolve().
Handle one object found on the path.
[in] | object | The current object on the Config path. |
Definition at line 434 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 421 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 413 of file config.cc.
References DoResolve(), m_path, and NS_LOG_FUNCTION.
|
private |
The Config path.
Definition at line 376 of file config.cc.
Referenced by Canonicalize(), and Resolve().
|
private |
Current list of path tokens.
Definition at line 374 of file config.cc.
Referenced by DoArrayResolve(), DoResolve(), and GetResolvedPath().