Eclipse SUMO - Simulation of Urban MObility
GNECandidateElement.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // class for candidate elements
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 
26 #include "GNECandidateElement.h"
27 
28 // ===========================================================================
29 // method definitions
30 // ===========================================================================
31 
32 
34  myPossibleCandidate(false),
35  mySourceCandidate(false),
36  myTargetCandidate(false),
37  mySpecialCandidate(false),
38  myConflictedCandidate(false),
39  myReachability(-1) {}
40 
41 
43 
44 
45 void
47  myPossibleCandidate = false;
48  mySourceCandidate = false;
49  myTargetCandidate = false;
50  mySpecialCandidate = false;
51  myConflictedCandidate = false;
52 }
53 
54 
55 bool
57  return myPossibleCandidate;
58 }
59 
60 
61 
62 bool
64  return mySourceCandidate;
65 }
66 
67 
68 bool
70  return myTargetCandidate;
71 }
72 
73 
74 bool
76  return mySpecialCandidate;
77 }
78 
79 
80 bool
82  return myConflictedCandidate;
83 }
84 
85 
86 void
88  myPossibleCandidate = value;
89 }
90 
91 
92 void
94  mySourceCandidate = value;
95 }
96 
97 
98 void
100  myTargetCandidate = value;
101 }
102 
103 
104 void
106  mySpecialCandidate = value;
107 }
108 
109 
110 void
112  myConflictedCandidate = value;
113 }
114 
115 
116 double
118  return myReachability;
119 }
120 
121 
122 void
123 GNECandidateElement::setReachability(const double reachability) {
124  myReachability = reachability;
125 }
126 
127 
128 void
130  myReachability = -1;
131 }
132 
133 /****************************************************************************/
void setReachability(const double reachability)
set current reachability (traveltime)
bool myPossibleCandidate
flag to mark this element as possible candidate
bool mySpecialCandidate
flag to mark this element as special candidate
bool isSpecialCandidate() const
check if this element is a special candidate
void resetCandidateFlags()
reset candidate flags
void setTargetCandidate(const bool value)
set element as target candidate
bool isPossibleCandidate() const
check if this element is a possible candidate
void resetReachability()
reset reachability (traveltime)
void setPossibleCandidate(const bool value)
set element as possible candidate
GNECandidateElement()
Constructor.
bool isTargetCandidate() const
check if this element is a target candidate
double getReachability() const
get current reability (traveltime)
void setSourceCandidate(const bool value)
set element as source candidate
bool isSourceCandidate() const
check if this element is a source candidate
bool isConflictedCandidate() const
check if this element is a conflicted candidate
bool myTargetCandidate
flag to mark this element as target candidate
void setConflictedCandidate(const bool value)
set element as conflicted candidate
double myReachability
value for reachability
bool myConflictedCandidate
flag to mark this element as conflicted candidate
bool mySourceCandidate
flag to mark this element as source candidate
void setSpecialCandidate(const bool value)
set element as special candidate
~GNECandidateElement()
Destructor.