Abstract class to parse Config paths into object references. More...
Collaboration diagram for ns3::Config::Resolver: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 380 of file config.cc.
References Canonicalize(), and NS_LOG_FUNCTION.
Here is the call graph for this 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().
Here is the caller graph for this function:
|
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 DoResolve(), m_workStack, ns3::Config::ArrayMatcher::Matches(), NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by DoResolve().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatepure virtual |
Handle one found object.
| [in] | object | The found object. |
| [in] | path | The matching Config path context. |
Referenced by DoResolveOne().
Here is the caller graph for this function: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(), DoResolve(), DoResolveOne(), 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().
Here is the call graph for this function:
Here is the caller graph for this function: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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function: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.
Here is the call graph for this 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().