Config system implementation class. More...
Public Member Functions | |
void | Connect (std::string path, const CallbackBase &cb) |
void | ConnectWithoutContext (std::string path, const CallbackBase &cb) |
void | Disconnect (std::string path, const CallbackBase &cb) |
void | DisconnectWithoutContext (std::string path, const CallbackBase &cb) |
Ptr< Object > | GetRootNamespaceObject (uint32_t i) const |
uint32_t | GetRootNamespaceObjectN (void) const |
Config::MatchContainer | LookupMatches (std::string path) |
void | RegisterRootNamespaceObject (Ptr< Object > obj) |
void | Set (std::string path, const AttributeValue &value) |
void | UnregisterRootNamespaceObject (Ptr< Object > obj) |
Private Types | |
typedef std::vector< Ptr< Object > > | Roots |
Container type to hold the root Config path tokens. More... | |
Private Member Functions | |
void | ParsePath (std::string path, std::string *root, std::string *leaf) const |
Break a Config path into the leading path and the last leaf token. More... | |
Private Attributes | |
Roots | m_roots |
The list of Config path roots. More... | |
Additional Inherited Members | |
![]() | |
static ConfigImpl * | Get (void) |
Get a pointer to the singleton instance. More... | |
|
private |
void ns3::ConfigImpl::Connect | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to connect to the matching trace sources. |
This function will attempt to find all trace sources which match the input path and will then connect the input callback to them in such a way that the callback will receive an extra context string upon trace event notification.
Definition at line 660 of file config.cc.
References ns3::Config::MatchContainer::Connect(), LookupMatches(), NS_LOG_FUNCTION, and ParsePath().
Referenced by ns3::Config::Connect().
void ns3::ConfigImpl::ConnectWithoutContext | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to connect to the matching trace sources. |
This function will attempt to find all trace sources which match the input path and will then connect the input callback to them.
Definition at line 642 of file config.cc.
References ns3::Config::MatchContainer::ConnectWithoutContext(), LookupMatches(), NS_LOG_FUNCTION, and ParsePath().
Referenced by ns3::Config::ConnectWithoutContext().
void ns3::ConfigImpl::Disconnect | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to connect to the matching trace sources. |
This function undoes the work of Config::ConnectWithContext.
Definition at line 670 of file config.cc.
References ns3::Config::MatchContainer::Disconnect(), LookupMatches(), NS_LOG_FUNCTION, and ParsePath().
Referenced by ns3::Config::Disconnect().
void ns3::ConfigImpl::DisconnectWithoutContext | ( | std::string | path, |
const CallbackBase & | cb | ||
) |
[in] | path | A path to match trace sources. |
[in] | cb | The callback to disconnect to the matching trace sources. |
This function undoes the work of Config::Connect.
Definition at line 651 of file config.cc.
References ns3::Config::MatchContainer::DisconnectWithoutContext(), LookupMatches(), NS_LOG_FUNCTION, and ParsePath().
Referenced by ns3::Config::DisconnectWithoutContext().
[in] | i | The index of the requested object. |
Definition at line 741 of file config.cc.
References m_roots, and NS_LOG_FUNCTION.
Referenced by ns3::Config::GetRootNamespaceObject().
uint32_t ns3::ConfigImpl::GetRootNamespaceObjectN | ( | void | ) | const |
Definition at line 735 of file config.cc.
References m_roots, and NS_LOG_FUNCTION.
Referenced by ns3::Config::GetRootNamespaceObjectN().
Config::MatchContainer ns3::ConfigImpl::LookupMatches | ( | std::string | path | ) |
[in] | path | The path to perform a match against |
Definition at line 681 of file config.cc.
References m_roots, and NS_LOG_FUNCTION.
Referenced by Connect(), ConnectWithoutContext(), Disconnect(), DisconnectWithoutContext(), ns3::Config::LookupMatches(), and Set().
|
private |
Break a Config path into the leading path and the last leaf token.
[in] | path | The Config path. |
[in,out] | root | The leading part of the path , up to the final slash. |
[in,out] | leaf | The trailing part of the path . |
Definition at line 620 of file config.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by Connect(), ConnectWithoutContext(), Disconnect(), DisconnectWithoutContext(), and Set().
[in] | obj | A new root object |
Each root object is used during path matching as the root of the path by Config::Connect, and Config::Set.
Definition at line 713 of file config.cc.
References m_roots, and NS_LOG_FUNCTION.
Referenced by ns3::Config::RegisterRootNamespaceObject().
void ns3::ConfigImpl::Set | ( | std::string | path, |
const AttributeValue & | value | ||
) |
[in] | path | A path to match attributes. |
[in] | value | The value to set in all matching attributes. |
This function will attempt to find attributes which match the input path and will then set their value to the input value.
Definition at line 632 of file config.cc.
References LookupMatches(), NS_LOG_FUNCTION, ParsePath(), and ns3::Config::MatchContainer::Set().
Referenced by ns3::Config::Set().
[in] | obj | A new root object |
This function undoes the work of Config::RegisterRootNamespaceObject.
Definition at line 720 of file config.cc.
References m_roots, and NS_LOG_FUNCTION.
Referenced by ns3::Config::UnregisterRootNamespaceObject().
|
private |
The list of Config path roots.
Definition at line 616 of file config.cc.
Referenced by GetRootNamespaceObject(), GetRootNamespaceObjectN(), LookupMatches(), RegisterRootNamespaceObject(), and UnregisterRootNamespaceObject().