Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/elements/GNECandidateElement.cpp
169678 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 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
/****************************************************************************/
14
/// @file GNECandidateElement.cpp
15
/// @author Pablo Alvarez Lopez
16
/// @date May 2020
17
///
18
// class for candidate elements
19
/****************************************************************************/
20
21
#include "GNECandidateElement.h"
22
23
// ===========================================================================
24
// method definitions
25
// ===========================================================================
26
27
28
GNECandidateElement::GNECandidateElement() {}
29
30
31
GNECandidateElement::~GNECandidateElement() {}
32
33
34
void
35
GNECandidateElement::resetCandidateFlags() {
36
myPossibleCandidate = false;
37
mySourceCandidate = false;
38
myTargetCandidate = false;
39
mySpecialCandidate = false;
40
myConflictedCandidate = false;
41
myInvalidCandidate = false;
42
}
43
44
45
bool
46
GNECandidateElement::isPossibleCandidate() const {
47
return myPossibleCandidate;
48
}
49
50
51
52
bool
53
GNECandidateElement::isSourceCandidate() const {
54
return mySourceCandidate;
55
}
56
57
58
bool
59
GNECandidateElement::isTargetCandidate() const {
60
return myTargetCandidate;
61
}
62
63
64
bool
65
GNECandidateElement::isSpecialCandidate() const {
66
return mySpecialCandidate;
67
}
68
69
70
bool
71
GNECandidateElement::isConflictedCandidate() const {
72
return myConflictedCandidate;
73
}
74
75
76
bool
77
GNECandidateElement::isInvalidCandidate() const {
78
return myInvalidCandidate;
79
}
80
81
82
void
83
GNECandidateElement::setPossibleCandidate(const bool value) {
84
myPossibleCandidate = value;
85
}
86
87
88
void
89
GNECandidateElement::setSourceCandidate(const bool value) {
90
mySourceCandidate = value;
91
}
92
93
94
void
95
GNECandidateElement::setTargetCandidate(const bool value) {
96
myTargetCandidate = value;
97
}
98
99
100
void
101
GNECandidateElement::setSpecialCandidate(const bool value) {
102
mySpecialCandidate = value;
103
}
104
105
106
void
107
GNECandidateElement::setConflictedCandidate(const bool value) {
108
myConflictedCandidate = value;
109
}
110
111
112
void
113
GNECandidateElement::setInvalidCandidate(const bool value) {
114
myInvalidCandidate = value;
115
}
116
117
118
double
119
GNECandidateElement::getReachability() const {
120
return myReachability;
121
}
122
123
124
void
125
GNECandidateElement::setReachability(const double reachability) {
126
myReachability = reachability;
127
}
128
129
130
void
131
GNECandidateElement::resetReachability() {
132
myReachability = -1;
133
}
134
135
/****************************************************************************/
136
137