ns3::NodeContainer Class Reference

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

#include <node-container.h>

List of all members.

Public Types

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

Public Member Functions

 NodeContainer ()
 NodeContainer (Ptr< Node > node)
 NodeContainer (const NodeContainer &a, const NodeContainer &b)
 NodeContainer (const NodeContainer &a, const NodeContainer &b, const NodeContainer &c)
 NodeContainer (const NodeContainer &a, const NodeContainer &b, const NodeContainer &c, const NodeContainer &d)
 NodeContainer (const NodeContainer &a, const NodeContainer &b, const NodeContainer &c, const NodeContainer &d, const NodeContainer &e)
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)

Static Public Member Functions

static NodeContainer GetGlobal (void)

Private Attributes

std::vector< Ptr< Node > > m_nodes

Detailed Description

keep track of a set of node pointers.

Definition at line 33 of file node-container.h.


Member Typedef Documentation

typedef std::vector<Ptr<Node> >::const_iterator ns3::NodeContainer::Iterator

Definition at line 36 of file node-container.h.


Constructor & Destructor Documentation

ns3::NodeContainer::NodeContainer (  ) 

Create an empty NodeContainer.

Definition at line 25 of file node-container.cc.

ns3::NodeContainer::NodeContainer ( Ptr< Node node  ) 
Parameters:
node a node to add to the container

Create a NodeContainer with exactly one node.

Definition at line 28 of file node-container.cc.

References m_nodes.

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.

Definition at line 32 of file node-container.cc.

References Add().

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

Definition at line 37 of file node-container.cc.

References Add().

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

Definition at line 44 of file node-container.cc.

References Add().

ns3::NodeContainer::NodeContainer ( const NodeContainer a,
const NodeContainer b,
const NodeContainer c,
const NodeContainer d,
const NodeContainer e 
)

Definition at line 53 of file node-container.cc.

References Add().


Member Function Documentation

void ns3::NodeContainer::Add ( Ptr< Node node  ) 
Parameters:
node a node pointer

Append the input node pointer at the end of this NodeContainer.

Definition at line 102 of file node-container.cc.

References m_nodes.

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

Append the node pointers from the input NodeContainer at the end of this NodeContainer.

Definition at line 94 of file node-container.cc.

References Begin(), End(), and m_nodes.

Referenced by GetGlobal(), and NodeContainer().

NodeContainer::Iterator ns3::NodeContainer::Begin ( void   )  const
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.

Definition at line 86 of file node-container.cc.

References m_nodes.

NodeContainer::Iterator ns3::NodeContainer::End ( void   )  const
Ptr< Node > ns3::NodeContainer::Get ( uint32_t  i  )  const
Parameters:
i the index of the requested node pointer.
Returns:
the requested node pointer.

Definition at line 81 of file node-container.cc.

References m_nodes.

Referenced by ns3::PointToPointHelper::EnqueueEvent(), ns3::CsmaHelper::EnqueueEvent(), and ns3::PointToPointHelper::Install().

NodeContainer ns3::NodeContainer::GetGlobal ( void   )  [static]
uint32_t ns3::NodeContainer::GetN ( void   )  const
Returns:
the number of node pointers stored in this NodeContainer.

Definition at line 76 of file node-container.cc.

References m_nodes.

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


Member Data Documentation

std::vector<Ptr<Node> > ns3::NodeContainer::m_nodes [private]

Definition at line 117 of file node-container.h.

Referenced by Add(), Begin(), Create(), End(), Get(), GetN(), and NodeContainer().


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