ns3::Config::MatchContainer Class Reference

hold a set of objects which match a specific search string. More...

#include <config.h>

List of all members.

Public Types

typedef std::vector< Ptr
< Object > >::const_iterator 
Iterator

Public Member Functions

 MatchContainer ()
 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< ObjectGet (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)

Private Attributes

std::vector< Ptr< Object > > m_objects
std::vector< std::string > m_contexts
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 121 of file config.h.


Member Typedef Documentation

typedef std::vector<Ptr<Object> >::const_iterator ns3::Config::MatchContainer::Iterator

Definition at line 124 of file config.h.


Constructor & Destructor Documentation

ns3::Config::MatchContainer::MatchContainer (  ) 

Definition at line 35 of file config.cc.

ns3::Config::MatchContainer::MatchContainer ( const std::vector< Ptr< Object > > &  objects,
const std::vector< std::string > &  contexts,
std::string  path 
)

Definition at line 37 of file config.cc.


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 45 of file config.cc.

References m_objects.

Referenced by ConnectWithoutContext(), DisconnectWithoutContext(), and Set().

void ns3::Config::MatchContainer::Connect ( std::string  name,
const CallbackBase cb 
)
Parameters:
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.

See also:
ns3::Config::Connect

Definition at line 85 of file config.cc.

References m_contexts, m_objects, and NS_ASSERT.

Referenced by ns3::ConfigImpl::Connect().

void ns3::Config::MatchContainer::ConnectWithoutContext ( std::string  name,
const CallbackBase cb 
)
Parameters:
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.

See also:
ns3::Config::ConnectWithoutContext

Definition at line 96 of file config.cc.

References Begin(), and End().

Referenced by ns3::ConfigImpl::ConnectWithoutContext().

void ns3::Config::MatchContainer::Disconnect ( std::string  name,
const CallbackBase cb 
)
Parameters:
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.

See also:
ns3::Config::Disconnect

Definition at line 105 of file config.cc.

References m_contexts, m_objects, and NS_ASSERT.

Referenced by ns3::ConfigImpl::Disconnect().

void ns3::Config::MatchContainer::DisconnectWithoutContext ( std::string  name,
const CallbackBase cb 
)
Parameters:
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.

See also:
ns3::Config::DisconnectWithoutContext

Definition at line 116 of file config.cc.

References Begin(), and End().

Referenced by ns3::ConfigImpl::DisconnectWithoutContext().

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

Definition at line 50 of file config.cc.

References m_objects.

Referenced by ConnectWithoutContext(), DisconnectWithoutContext(), and Set().

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

Definition at line 60 of file config.cc.

References m_objects.

std::string ns3::Config::MatchContainer::GetMatchedPath ( uint32_t  i  )  const
Parameters:
i index 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 65 of file config.cc.

References m_contexts.

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

Definition at line 55 of file config.cc.

References m_objects.

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

Definition at line 70 of file config.cc.

References m_path.

void ns3::Config::MatchContainer::Set ( std::string  name,
const AttributeValue value 
)
Parameters:
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.

See also:
ns3::Config::Set

Definition at line 76 of file config.cc.

References Begin(), and End().

Referenced by ns3::ConfigImpl::Set().


Member Data Documentation

std::vector<std::string> ns3::Config::MatchContainer::m_contexts [private]

Definition at line 208 of file config.h.

Referenced by Connect(), Disconnect(), and GetMatchedPath().

Definition at line 207 of file config.h.

Referenced by Begin(), Connect(), Disconnect(), End(), Get(), and GetN().

std::string ns3::Config::MatchContainer::m_path [private]

Definition at line 209 of file config.h.

Referenced by GetPath().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:12:20 2009 for NS-3 by  doxygen 1.6.3