ns3::CandidateQueue Class Reference

A Candidate Queue used in static routing. More...

#include <candidate-queue.h>

List of all members.

Public Member Functions

 CandidateQueue ()
 Create an empty SPF Candidate Queue.
void Clear (void)
 Empty the Candidate Queue and release all of the resources associated with the Shortest Path First Vertex pointers in the queue.
void Push (SPFVertex *vNew)
 Push a Shortest Path First Vertex pointer onto the queue according to the priority scheme.
SPFVertexPop (void)
 Pop the Shortest Path First Vertex pointer at the top of the queue.
SPFVertexTop (void) const
 Return the Shortest Path First Vertex pointer at the top of the queue.
bool Empty (void) const
 Test the Candidate Queue to determine if it is empty.
uint32_t Size (void) const
 Return the number of Shortest Path First Vertex pointers presently stored in the Candidate Queue.
SPFVertexFind (const Ipv4Address addr) const
 Searches the Candidate Queue for a Shortest Path First Vertex pointer that points to a vertex having the given IP address.
void Reorder (void)
 Reorders the Candidate Queue according to the priority scheme.

Private Member Functions

 CandidateQueue (CandidateQueue &sr)
CandidateQueueoperator= (CandidateQueue &sr)


Detailed Description

A Candidate Queue used in static routing.

The CandidateQueue is used in the OSPF shortest path computations. It is a priority queue used to store candidates for the shortest path to a given network.

The queue holds Shortest Path First Vertex pointers and orders them according to the lowest value of the field m_distanceFromRoot. Remaining vertices are ordered according to increasing distance. This implements a priority queue.

Although a STL priority_queue almost does what we want, the requirement for a Find () operation, the dynamic nature of the data and the derived requirement for a Reorder () operation led us to implement this simple enhanced priority queue.


Constructor & Destructor Documentation

ns3::CandidateQueue::CandidateQueue ( CandidateQueue sr  )  [private]

Candidate Queue copy construction is disallowed (not implemented) to prevent the compiler from slipping in incorrect versions that don't properly deal with deep copies.


Member Function Documentation

CandidateQueue& ns3::CandidateQueue::operator= ( CandidateQueue sr  )  [private]

Candidate Queue assignment operator is disallowed (not implemented) to prevent the compiler from slipping in incorrect versions that don't properly deal with deep copies.


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

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