src/routing/candidate-queue.h
changeset 1099 1e97c5a86b24
parent 1085 c12d61407468
child 1101 6a34eab865da
equal deleted inserted replaced
1098:fb9d81fae2c7 1099:1e97c5a86b24
    93    *
    93    *
    94    * @see SPFVertex
    94    * @see SPFVertex
    95    * @see Pop ()
    95    * @see Pop ()
    96    * @returns The Shortest Path First Vertex pointer at the top of the queue.
    96    * @returns The Shortest Path First Vertex pointer at the top of the queue.
    97    */
    97    */
    98   SPFVertex*    Top (void);
    98   SPFVertex*    Top (void) const;
    99   /**
    99   /**
   100    * Test the Candidate Queue to determine if it is empty.
   100    * Test the Candidate Queue to determine if it is empty.
   101    *
   101    *
   102    * @returns True if the queue is empty, false otherwise.
   102    * @returns True if the queue is empty, false otherwise.
   103    */
   103    */
   104   bool          Empty (void);
   104   bool          Empty (void) const;
   105   /**
   105   /**
   106    * Return the number of Shortest Path First Vertex pointers presently
   106    * Return the number of Shortest Path First Vertex pointers presently
   107    * stored in the Candidate Queue.
   107    * stored in the Candidate Queue.
   108    *
   108    *
   109    * @see SPFVertex
   109    * @see SPFVertex
   110    * @returns The number of SPFVertex* pointers in the Candidate Queue.
   110    * @returns The number of SPFVertex* pointers in the Candidate Queue.
   111    */
   111    */
   112   uint32_t      Size (void);
   112   uint32_t      Size (void) const;
   113   /**
   113   /**
   114    * Searches the Candidate Queue for a Shortest Path First Vertex pointer
   114    * Searches the Candidate Queue for a Shortest Path First Vertex pointer
   115    * that points to a vertex having the given IP address.
   115    * that points to a vertex having the given IP address.
   116    *
   116    *
   117    * @see SPFVertex
   117    * @see SPFVertex
   118    * @param addr The IP address to search for.
   118    * @param addr The IP address to search for.
   119    * @returns The SPFVertex* pointer corresponding to the given IP address.
   119    * @returns The SPFVertex* pointer corresponding to the given IP address.
   120    */
   120    */
   121   SPFVertex*    Find (const Ipv4Address addr);
   121   SPFVertex*    Find (const Ipv4Address addr) const;
   122   /**
   122   /**
   123    * Reorders the Candidate Queue according to the priority scheme.  On 
   123    * Reorders the Candidate Queue according to the priority scheme.  On 
   124    * completion, the top of the queue will hold the Shortest Path First
   124    * completion, the top of the queue will hold the Shortest Path First
   125    * Vertex pointer that points to a vertex having lowest value of the field
   125    * Vertex pointer that points to a vertex having lowest value of the field
   126    * m_distanceFromRoot.  Remaining vertices are ordered according to 
   126    * m_distanceFromRoot.  Remaining vertices are ordered according to