ns-3
|
hold a set of objects which match a specific search string. More...
#include <config.h>
Public Types | |
typedef std::vector< Ptr < Object > >::const_iterator | Iterator |
Public Member Functions | |
MatchContainer (const std::vector< Ptr< Object > > &objects, const std::vector< std::string > &contexts, std::string path) | |
MatchContainer::Iterator | Begin (void) const |
MatchContainer::Iterator | End (void) const |
uint32_t | GetN (void) const |
Ptr< Object > | Get (uint32_t i) const |
std::string | GetMatchedPath (uint32_t i) const |
std::string | GetPath (void) const |
void | Set (std::string name, const AttributeValue &value) |
void | Connect (std::string name, const CallbackBase &cb) |
void | ConnectWithoutContext (std::string name, const CallbackBase &cb) |
void | Disconnect (std::string name, const CallbackBase &cb) |
void | DisconnectWithoutContext (std::string name, const CallbackBase &cb) |
hold a set of objects which match a specific search string.
This class also allows you to perform a set of configuration operations on the set of matching objects stored in the container. Specifically, it is possible to perform bulk Connects and Sets.
MatchContainer::Iterator ns3::Config::MatchContainer::Begin | ( | void | ) | const |
Referenced by ConnectWithoutContext(), DisconnectWithoutContext(), and Set().
void ns3::Config::MatchContainer::Connect | ( | std::string | name, |
const CallbackBase & | cb | ||
) |
name | the name of the trace source to connect to |
cb | the sink to connect to the trace source |
Connect the specified sink to all the objects stored in this container.
References NS_ASSERT.
void ns3::Config::MatchContainer::ConnectWithoutContext | ( | std::string | name, |
const CallbackBase & | cb | ||
) |
name | the name of the trace source to connect to |
cb | the sink to connect to the trace source |
Connect the specified sink to all the objects stored in this container.
References Begin(), End(), and ns3::ObjectBase::TraceConnectWithoutContext().
void ns3::Config::MatchContainer::Disconnect | ( | std::string | name, |
const CallbackBase & | cb | ||
) |
name | the name of the trace source to disconnect from |
cb | the sink to disconnect from the trace source |
Disconnect the specified sink from all the objects stored in this container.
References NS_ASSERT.
void ns3::Config::MatchContainer::DisconnectWithoutContext | ( | std::string | name, |
const CallbackBase & | cb | ||
) |
name | the name of the trace source to disconnect from |
cb | the sink to disconnect from the trace source |
Disconnect the specified sink from all the objects stored in this container.
References Begin(), End(), and ns3::ObjectBase::TraceDisconnectWithoutContext().
MatchContainer::Iterator ns3::Config::MatchContainer::End | ( | void | ) | const |
Referenced by ConnectWithoutContext(), DisconnectWithoutContext(), and Set().
Ptr< Object > ns3::Config::MatchContainer::Get | ( | uint32_t | i | ) | const |
i | index of item to lookup ([0,n[) |
std::string ns3::Config::MatchContainer::GetMatchedPath | ( | uint32_t | i | ) | const |
i | index of item to lookup ([0,n[) |
The matching patch uniquely identifies the requested object.
uint32_t ns3::Config::MatchContainer::GetN | ( | void | ) | const |
std::string ns3::Config::MatchContainer::GetPath | ( | void | ) | const |
void ns3::Config::MatchContainer::Set | ( | std::string | name, |
const AttributeValue & | value | ||
) |
name | name of attribute to set |
value | value to set to the attribute |
Set the specified attribute value to all the objects stored in this container.
References Begin(), End(), and ns3::ObjectBase::SetAttribute().