#include <candidate-queue.h>
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. | |
| SPFVertex * | Pop (void) |
| Pop the Shortest Path First Vertex pointer at the top of the queue. | |
| SPFVertex * | Top (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. | |
| SPFVertex * | Find (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) | |
| CandidateQueue & | operator= (CandidateQueue &sr) |
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.
| 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.
| 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.
1.5.8