A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::Config::MatchContainer Class Reference

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
 
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)
 
MatchContainer::Iterator End (void) const
 
Ptr< ObjectGet (uint32_t i) const
 
std::string GetMatchedPath (uint32_t i) const
 
uint32_t GetN (void) const
 
std::string GetPath (void) const
 
void Set (std::string name, const AttributeValue &value)
 

Private Attributes

std::vector< std::string > m_contexts
 
std::vector< Ptr< Object > > m_objects
 
std::string m_path
 

Detailed Description

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.

Definition at line 127 of file config.h.

Member Function Documentation

MatchContainer::Iterator ns3::Config::MatchContainer::Begin ( void  ) const
Returns
an iterator which points to the first item in the container

Definition at line 51 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::RandomVariableStreamHelper::AssignStreams(), ConnectWithoutContext(), DisconnectWithoutContext(), and Set().

void ns3::Config::MatchContainer::Connect ( std::string  name,
const CallbackBase cb 
)
Parameters
namethe name of the trace source to connect to
cbthe sink to connect to the trace source

Connect the specified sink to all the objects stored in this container.

See Also
ns3::Config::Connect

Definition at line 98 of file config.cc.

References NS_ASSERT, and NS_LOG_FUNCTION.

void ns3::Config::MatchContainer::ConnectWithoutContext ( std::string  name,
const CallbackBase cb 
)
Parameters
namethe name of the trace source to connect to
cbthe sink to connect to the trace source

Connect the specified sink to all the objects stored in this container.

See Also
ns3::Config::ConnectWithoutContext

Definition at line 110 of file config.cc.

References Begin(), End(), NS_LOG_FUNCTION, and ns3::ObjectBase::TraceConnectWithoutContext().

void ns3::Config::MatchContainer::Disconnect ( std::string  name,
const CallbackBase cb 
)
Parameters
namethe name of the trace source to disconnect from
cbthe sink to disconnect from the trace source

Disconnect the specified sink from all the objects stored in this container.

See Also
ns3::Config::Disconnect

Definition at line 121 of file config.cc.

References NS_ASSERT, and NS_LOG_FUNCTION.

void ns3::Config::MatchContainer::DisconnectWithoutContext ( std::string  name,
const CallbackBase cb 
)
Parameters
namethe name of the trace source to disconnect from
cbthe sink to disconnect from the trace source

Disconnect the specified sink from all the objects stored in this container.

See Also
ns3::Config::DisconnectWithoutContext

Definition at line 133 of file config.cc.

References Begin(), End(), NS_LOG_FUNCTION, and ns3::ObjectBase::TraceDisconnectWithoutContext().

MatchContainer::Iterator ns3::Config::MatchContainer::End ( void  ) const
Returns
an iterator which points to the last item in the container

Definition at line 57 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::RandomVariableStreamHelper::AssignStreams(), ConnectWithoutContext(), DisconnectWithoutContext(), and Set().

Ptr< Object > ns3::Config::MatchContainer::Get ( uint32_t  i) const
Parameters
iindex of item to lookup ([0,n[)
Returns
the item requested.

Definition at line 69 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::RandomVariableStreamHelper::AssignStreams(), and ns3::RadioEnvironmentMapHelper::Install().

std::string ns3::Config::MatchContainer::GetMatchedPath ( uint32_t  i) const
Parameters
iindex of item to lookup ([0,n[)
Returns
the fully-qualified matching path associated to the requested item.

The matching patch uniquely identifies the requested object.

Definition at line 75 of file config.cc.

References NS_LOG_FUNCTION.

uint32_t ns3::Config::MatchContainer::GetN ( void  ) const
Returns
the number of items in the container

Definition at line 63 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::RadioEnvironmentMapHelper::Install().

std::string ns3::Config::MatchContainer::GetPath ( void  ) const
Returns
the path used to perform the object matching.

Definition at line 81 of file config.cc.

References NS_LOG_FUNCTION.

void ns3::Config::MatchContainer::Set ( std::string  name,
const AttributeValue value 
)
Parameters
namename of attribute to set
valuevalue to set to the attribute

Set the specified attribute value to all the objects stored in this container.

See Also
ns3::Config::Set

Definition at line 88 of file config.cc.

References Begin(), End(), NS_LOG_FUNCTION, and ns3::ObjectBase::SetAttribute().


The documentation for this class was generated from the following files: