ns3::NodeContainer Class Reference

keep track of a set of node pointers. More...

#include <node-container.h>

List of all members.

Public Member Functions

 NodeContainer ()
 NodeContainer (Ptr< Node > node)
 NodeContainer (std::string nodeName)
 NodeContainer (const NodeContainer &a, const NodeContainer &b)
Iterator Begin (void) const
Iterator End (void) const
uint32_t GetN (void) const
Ptr< NodeGet (uint32_t i) const
void Create (uint32_t n)
void Add (NodeContainer other)
void Add (Ptr< Node > node)
void Add (std::string nodeName)

Static Public Member Functions

static NodeContainer GetGlobal (void)


Detailed Description

keep track of a set of node pointers.

Constructor & Destructor Documentation

ns3::NodeContainer::NodeContainer (  ) 

Create an empty NodeContainer.

ns3::NodeContainer::NodeContainer ( Ptr< Node node  ) 

Parameters:
node a node to add to the container
Create a NodeContainer with exactly one node.

ns3::NodeContainer::NodeContainer ( std::string  nodeName  ) 

Parameters:
nodeName The name of a node to add to the container
Create a NodeContainer with exactly one node.

ns3::NodeContainer::NodeContainer ( const NodeContainer a,
const NodeContainer b 
)

Parameters:
a a node container
b another node container
Create a node container which is a concatenation of the two input NodeContainers.

Note:
A frequently seen idiom that uses these constructors involves the implicit conversion by constructor of Ptr<Node>. When used, two Ptr<Node> will be passed to this constructor instead of NodeContainer&. C++ will notice the implicit conversion path that goes through the NodeContainer (Ptr<Node> node) constructor above. Using this conversion one may provide optionally provide arguments of Ptr<Node> to these constructors.


Member Function Documentation

void ns3::NodeContainer::Add ( std::string  nodeName  ) 

Parameters:
nodeName The name of a node
Append the input node pointer at the end of this NodeContainer.

void ns3::NodeContainer::Add ( Ptr< Node node  ) 

Parameters:
node a node pointer
Append the input node pointer at the end of this NodeContainer.

void ns3::NodeContainer::Add ( NodeContainer  other  ) 

Parameters:
other another NodeContainer
Append the node pointers from the input NodeContainer at the end of this NodeContainer.

Iterator ns3::NodeContainer::Begin ( void   )  const

Returns:
an iterator to the start of the vector of node pointers.

void ns3::NodeContainer::Create ( uint32_t  n  ) 

Parameters:
n the number of nodes to create
Create n nodes and append pointers to them to the end of this NodeContainer.

Iterator ns3::NodeContainer::End ( void   )  const

Returns:
an iterator to the end of the vector of node pointers.

Ptr<Node> ns3::NodeContainer::Get ( uint32_t  i  )  const

Parameters:
i the index of the requested node pointer.
Returns:
the requested node pointer.

static NodeContainer ns3::NodeContainer::GetGlobal ( void   )  [static]

Returns:
a container which contains a list of _all_ nodes created through NodeContainer::Create and stored in ns3::NodeList.

uint32_t ns3::NodeContainer::GetN ( void   )  const

Returns:
the number of node pointers stored in this NodeContainer.


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

Generated on Fri Apr 9 15:01:10 2010 for NS-3 by  doxygen 1.5.8