ns3::ListPositionAllocator Class Reference

Allocate positions from a deterministic list specified by the user. More...

#include <position-allocator.h>

Inheritance diagram for ns3::ListPositionAllocator:
Inheritance graph
[legend]
Collaboration diagram for ns3::ListPositionAllocator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ListPositionAllocator ()
void Add (Vector v)
virtual Vector GetNext (void) const

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::ListPositionAllocator.

Private Attributes

std::vector< Vectorm_positions
std::vector< Vector >
::const_iterator 
m_current

Detailed Description

Allocate positions from a deterministic list specified by the user.

The first call to ListPositionAllocator::GetNext will return the first element of the list, the second call, the second element, and so on.

Definition at line 55 of file position-allocator.h.


Constructor & Destructor Documentation

ns3::ListPositionAllocator::ListPositionAllocator (  ) 

Definition at line 60 of file position-allocator.cc.


Member Function Documentation

void ns3::ListPositionAllocator::Add ( Vector  v  ) 
Parameters:
v the position to append at the end of the list of positions to return from GetNext.

Definition at line 63 of file position-allocator.cc.

References m_current, and m_positions.

Vector ns3::ListPositionAllocator::GetNext ( void   )  const [virtual]
Returns:
the next chosen position.

This method _must_ be implement in subclasses.

Implements ns3::PositionAllocator.

Definition at line 69 of file position-allocator.cc.

References m_current, and m_positions.

TypeId ns3::ListPositionAllocator::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::ListPositionAllocator.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/$ns3MobilityModel/$ns3RandomWaypointMobilityModel/Position/$ns3ListPositionAllocator

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::PositionAllocator.

Definition at line 52 of file position-allocator.cc.

References ns3::TypeId::SetParent().


Member Data Documentation

std::vector<Vector>::const_iterator ns3::ListPositionAllocator::m_current [mutable, private]

Definition at line 69 of file position-allocator.h.

Referenced by Add(), and GetNext().

Definition at line 68 of file position-allocator.h.

Referenced by Add(), and GetNext().


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