This documentation is not the
Latest Release
.
A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
candidate-queue.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright 2007 University of Washington
4
*
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
17
*
18
* Author: Craig Dowell (craigdo@ee.washington.edu)
19
*/
20
21
#ifndef CANDIDATE_QUEUE_H
22
#define CANDIDATE_QUEUE_H
23
24
#include <stdint.h>
25
#include <list>
26
#include "ns3/ipv4-address.h"
27
28
namespace
ns3
{
29
30
class
SPFVertex;
31
49
class
CandidateQueue
50
{
51
public
:
57
CandidateQueue
();
58
65
virtual
~CandidateQueue
();
66
73
void
Clear
(
void
);
74
87
void
Push
(
SPFVertex
*vNew);
88
99
SPFVertex
*
Pop
(
void
);
100
112
SPFVertex
*
Top
(
void
)
const
;
113
119
bool
Empty
(
void
)
const
;
120
128
uint32_t
Size
(
void
)
const
;
129
138
SPFVertex
*
Find
(
const
Ipv4Address
addr)
const
;
139
153
void
Reorder
(
void
);
154
155
private
:
162
CandidateQueue
(
CandidateQueue
& sr);
163
171
CandidateQueue
&
operator=
(
CandidateQueue
& sr);
183
static
bool
CompareSPFVertex
(
const
SPFVertex
* v1,
const
SPFVertex
* v2);
184
185
typedef
std::list<SPFVertex*>
CandidateList_t
;
186
CandidateList_t
m_candidates
;
187
195
friend
std::ostream&
operator<<
(std::ostream& os,
const
CandidateQueue
& q);
196
};
197
198
}
// namespace ns3
199
200
#endif
/* CANDIDATE_QUEUE_H */
ns3::CandidateQueue::Pop
SPFVertex * Pop(void)
Pop the Shortest Path First Vertex pointer at the top of the queue.
Definition:
candidate-queue.cc:105
ns3::CandidateQueue::Top
SPFVertex * Top(void) const
Return the Shortest Path First Vertex pointer at the top of the queue.
Definition:
candidate-queue.cc:119
ns3::SPFVertex
Vertex used in shortest path first (SPF) computations.
Definition:
global-route-manager-impl.h:66
ns3::CandidateQueue::Size
uint32_t Size(void) const
Return the number of Shortest Path First Vertex pointers presently stored in the Candidate Queue...
Definition:
candidate-queue.cc:138
ns3::CandidateQueue::CompareSPFVertex
static bool CompareSPFVertex(const SPFVertex *v1, const SPFVertex *v2)
return true if v1 < v2
Definition:
candidate-queue.cc:180
ns3::CandidateQueue
A Candidate Queue used in static routing.
Definition:
candidate-queue.h:49
ns3::CandidateQueue::Clear
void Clear(void)
Empty the Candidate Queue and release all of the resources associated with the Shortest Path First Ve...
Definition:
candidate-queue.cc:81
ns3::CandidateQueue::Push
void Push(SPFVertex *vNew)
Push a Shortest Path First Vertex pointer onto the queue according to the priority scheme...
Definition:
candidate-queue.cc:93
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::CandidateQueue::m_candidates
CandidateList_t m_candidates
SPFVertex candidates.
Definition:
candidate-queue.h:186
ns3::CandidateQueue::CandidateQueue
CandidateQueue()
Create an empty SPF Candidate Queue.
Definition:
candidate-queue.cc:68
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:40
ns3::CandidateQueue::Find
SPFVertex * Find(const Ipv4Address addr) const
Searches the Candidate Queue for a Shortest Path First Vertex pointer that points to a vertex having ...
Definition:
candidate-queue.cc:145
ns3::CandidateQueue::CandidateList_t
std::list< SPFVertex * > CandidateList_t
container of SPFVertex pointers
Definition:
candidate-queue.h:185
ns3::CandidateQueue::~CandidateQueue
virtual ~CandidateQueue()
Destroy an SPF Candidate Queue and release any resources held by the contents.
Definition:
candidate-queue.cc:74
ns3::CandidateQueue::Empty
bool Empty(void) const
Test the Candidate Queue to determine if it is empty.
Definition:
candidate-queue.cc:131
ns3::CandidateQueue::Reorder
void Reorder(void)
Reorders the Candidate Queue according to the priority scheme.
Definition:
candidate-queue.cc:163
ns3::CandidateQueue::operator=
CandidateQueue & operator=(CandidateQueue &sr)
Candidate Queue assignment operator is disallowed (not implemented) to prevent the compiler from slip...
ns3::CandidateQueue::operator<<
friend std::ostream & operator<<(std::ostream &os, const CandidateQueue &q)
Stream insertion operator.
Definition:
candidate-queue.cc:50
src
internet
model
candidate-queue.h
Generated on Wed Nov 11 2015 20:00:31 for ns-3 by
1.8.9.1