author | Tommaso Pecorella <tommaso.pecorella@unifi.it> |
Fri, 24 Jul 2015 08:59:57 +0200 | |
changeset 11542 | 457d8732ca24 |
parent 11045 | 6024c150e4c8 |
permissions | -rw-r--r-- |
1111 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
1457
562a7017ed93
Copyrights/licenses for routing code
Tom Henderson <tomh@tomh.org>
parents:
1121
diff
changeset
|
3 |
* Copyright 2007 University of Washington |
562a7017ed93
Copyrights/licenses for routing code
Tom Henderson <tomh@tomh.org>
parents:
1121
diff
changeset
|
4 |
* |
1111 | 5 |
* This program is free software; you can redistribute it and/or modify |
6 |
* it under the terms of the GNU General Public License version 2 as |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
1457
562a7017ed93
Copyrights/licenses for routing code
Tom Henderson <tomh@tomh.org>
parents:
1121
diff
changeset
|
17 |
* |
562a7017ed93
Copyrights/licenses for routing code
Tom Henderson <tomh@tomh.org>
parents:
1121
diff
changeset
|
18 |
* Author: Craig Dowell (craigdo@ee.washington.edu) |
1111 | 19 |
*/ |
20 |
||
21 |
#ifndef CANDIDATE_QUEUE_H |
|
22 |
#define CANDIDATE_QUEUE_H |
|
23 |
||
24 |
#include <stdint.h> |
|
25 |
#include <list> |
|
2196
fb01b99ce66d
Don't include the 'global-route-manager-impl.h' private header from the public header 'candidate-queue.h'.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1457
diff
changeset
|
26 |
#include "ns3/ipv4-address.h" |
1111 | 27 |
|
28 |
namespace ns3 { |
|
29 |
||
2196
fb01b99ce66d
Don't include the 'global-route-manager-impl.h' private header from the public header 'candidate-queue.h'.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1457
diff
changeset
|
30 |
class SPFVertex; |
fb01b99ce66d
Don't include the 'global-route-manager-impl.h' private header from the public header 'candidate-queue.h'.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1457
diff
changeset
|
31 |
|
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
32 |
/** |
1111 | 33 |
* \brief A Candidate Queue used in static routing. |
34 |
* |
|
35 |
* The CandidateQueue is used in the OSPF shortest path computations. It |
|
36 |
* is a priority queue used to store candidates for the shortest path to a |
|
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
37 |
* given network. |
1111 | 38 |
* |
39 |
* The queue holds Shortest Path First Vertex pointers and orders them |
|
40 |
* according to the lowest value of the field m_distanceFromRoot. Remaining |
|
41 |
* vertices are ordered according to increasing distance. This implements a |
|
42 |
* priority queue. |
|
43 |
* |
|
44 |
* Although a STL priority_queue almost does what we want, the requirement |
|
45 |
* for a Find () operation, the dynamic nature of the data and the derived |
|
46 |
* requirement for a Reorder () operation led us to implement this simple |
|
47 |
* enhanced priority queue. |
|
48 |
*/ |
|
49 |
class CandidateQueue |
|
50 |
{ |
|
51 |
public: |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
52 |
/** |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
53 |
* @brief Create an empty SPF Candidate Queue. |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
54 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
55 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
56 |
*/ |
1111 | 57 |
CandidateQueue (); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
58 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
59 |
/** |
11045
6024c150e4c8
[Doxygen] Remove inappropriate uses of @internal
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10440
diff
changeset
|
60 |
* @brief Destroy an SPF Candidate Queue and release any resources held |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
61 |
* by the contents. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
62 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
63 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
64 |
*/ |
1111 | 65 |
virtual ~CandidateQueue (); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
66 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
67 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
68 |
* @brief Empty the Candidate Queue and release all of the resources |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
69 |
* associated with the Shortest Path First Vertex pointers in the queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
70 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
71 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
72 |
*/ |
1111 | 73 |
void Clear (void); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
74 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
75 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
76 |
* @brief Push a Shortest Path First Vertex pointer onto the queue according |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
77 |
* to the priority scheme. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
78 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
79 |
* On completion, the top of the queue will hold the Shortest Path First |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
80 |
* Vertex pointer that points to a vertex having lowest value of the field |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
81 |
* m_distanceFromRoot. Remaining vertices are ordered according to |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
82 |
* increasing distance. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
83 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
84 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
85 |
* @param vNew The Shortest Path First Vertex to add to the queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
86 |
*/ |
1111 | 87 |
void Push (SPFVertex *vNew); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
88 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
89 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
90 |
* @brief Pop the Shortest Path First Vertex pointer at the top of the queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
91 |
* |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5858
diff
changeset
|
92 |
* The caller is given the responsibility for releasing the resources |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
93 |
* associated with the vertex. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
94 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
95 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
96 |
* @see Top () |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
97 |
* @returns The Shortest Path First Vertex pointer at the top of the queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
98 |
*/ |
1111 | 99 |
SPFVertex* Pop (void); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
100 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
101 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
102 |
* @brief Return the Shortest Path First Vertex pointer at the top of the |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
103 |
* queue. |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
104 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
105 |
* This method does not pop the SPFVertex* off of the queue, it simply |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
106 |
* returns the pointer. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
107 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
108 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
109 |
* @see Pop () |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
110 |
* @returns The Shortest Path First Vertex pointer at the top of the queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
111 |
*/ |
1111 | 112 |
SPFVertex* Top (void) const; |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
113 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
114 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
115 |
* @brief Test the Candidate Queue to determine if it is empty. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
116 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
117 |
* @returns True if the queue is empty, false otherwise. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
118 |
*/ |
1111 | 119 |
bool Empty (void) const; |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
120 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
121 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
122 |
* @brief Return the number of Shortest Path First Vertex pointers presently |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
123 |
* stored in the Candidate Queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
124 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
125 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
126 |
* @returns The number of SPFVertex* pointers in the Candidate Queue. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
127 |
*/ |
1111 | 128 |
uint32_t Size (void) const; |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
129 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
130 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
131 |
* @brief Searches the Candidate Queue for a Shortest Path First Vertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
132 |
* pointer that points to a vertex having the given IP address. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
133 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
134 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
135 |
* @param addr The IP address to search for. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
136 |
* @returns The SPFVertex* pointer corresponding to the given IP address. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
137 |
*/ |
1111 | 138 |
SPFVertex* Find (const Ipv4Address addr) const; |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
139 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
140 |
/** |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
141 |
* @brief Reorders the Candidate Queue according to the priority scheme. |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
142 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
143 |
* On completion, the top of the queue will hold the Shortest Path First |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
144 |
* Vertex pointer that points to a vertex having lowest value of the field |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
145 |
* m_distanceFromRoot. Remaining vertices are ordered according to |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
146 |
* increasing distance. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
147 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
148 |
* This method is provided in case the values of m_distanceFromRoot change |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
149 |
* during the routing calculations. |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
150 |
* |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
151 |
* @see SPFVertex |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
152 |
*/ |
1111 | 153 |
void Reorder (void); |
154 |
||
155 |
private: |
|
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
156 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
157 |
* Candidate Queue copy construction is disallowed (not implemented) to |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
158 |
* prevent the compiler from slipping in incorrect versions that don't |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
159 |
* properly deal with deep copies. |
5227
ecb08c1fc273
Fix some doxygen warnings revealed by WARN_NO_PARAMDOC=YES in doc/doxygen.conf.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
3378
diff
changeset
|
160 |
* \param sr object to copy |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
161 |
*/ |
1111 | 162 |
CandidateQueue (CandidateQueue& sr); |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
163 |
|
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
164 |
/** |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
165 |
* Candidate Queue assignment operator is disallowed (not implemented) to |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
166 |
* prevent the compiler from slipping in incorrect versions that don't |
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
167 |
* properly deal with deep copies. |
5227
ecb08c1fc273
Fix some doxygen warnings revealed by WARN_NO_PARAMDOC=YES in doc/doxygen.conf.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
3378
diff
changeset
|
168 |
* \param sr object to assign |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
169 |
* \return copied object |
1114
4bf5d1262aae
doxygen update (@internal)
Craig Dowell <craigdo@ee.washington.edu>
parents:
1111
diff
changeset
|
170 |
*/ |
1111 | 171 |
CandidateQueue& operator= (CandidateQueue& sr); |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
172 |
/** |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
173 |
* \brief return true if v1 < v2 |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
174 |
* |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
175 |
* SPFVertexes are added into the queue according to the ordering |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
176 |
* defined by this method. If v1 should be popped before v2, this |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
177 |
* method return true; false otherwise |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
178 |
* |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
179 |
* \param v1 first operand |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
180 |
* \param v2 second operand |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
181 |
* \return True if v1 should be popped before v2; false otherwise |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
182 |
*/ |
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
183 |
static bool CompareSPFVertex (const SPFVertex* v1, const SPFVertex* v2); |
3378
747aeace32ee
no need for protected members
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2196
diff
changeset
|
184 |
|
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
185 |
typedef std::list<SPFVertex*> CandidateList_t; //!< container of SPFVertex pointers |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
186 |
CandidateList_t m_candidates; //!< SPFVertex candidates |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
187 |
|
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
188 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
189 |
* \brief Stream insertion operator. |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
190 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
191 |
* \param os the reference to the output stream |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
192 |
* \param q the CandidateQueue |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
193 |
* \returns the reference to the output stream |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7176
diff
changeset
|
194 |
*/ |
5858
afb51c7f34c2
bug 667: Add equal-cost multipath routing (ECMP) to IPv4 global routing
Wilson Thong <wilsonwk@ee.cityu.edu.hk>
parents:
5227
diff
changeset
|
195 |
friend std::ostream& operator<< (std::ostream& os, const CandidateQueue& q); |
1111 | 196 |
}; |
197 |
||
198 |
} // namespace ns3 |
|
199 |
||
200 |
#endif /* CANDIDATE_QUEUE_H */ |