Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNELaneTemplate.cpp
Go to the documentation of this file.
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/****************************************************************************/
18// Template for lanes
19/****************************************************************************/
20
22
23#include "GNELaneTemplate.h"
24
25// ===========================================================================
26// members methods
27// ===========================================================================
28
30 GNEAttributeCarrier(SUMO_TAG_LANE, lane->getNet()),
31 myLane(lane) {
32}
33
34
37
38
41 return nullptr;
42}
43
44
47 return nullptr;
48}
49
50
53 return nullptr;
54}
55
56
57const Parameterised*
59 return nullptr;
60}
61
62
67
68
71 return nullptr;
72}
73
74
75const GUIGlObject*
77 return nullptr;
78}
79
80
81void
83 throw InvalidArgument("cannot be called in templates");
84}
85
86
87bool
89 return false;
90}
91
92
93bool
95 return false;
96}
97
98
99bool
101 return false;
102}
103
104
105bool
107 return false;
108}
109
110
111bool
113 return false;
114}
115
116
117bool
119 return false;
120}
121
122
123bool
125 return false;
126}
127
128
129bool
131 return false;
132}
133
134
135std::string
139
140
141double
145
146
151
152
157
158
159void
160GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/, GNEUndoList* /*undoList*/) {
161 throw InvalidArgument("cannot be called in templates");
162}
163
164
165bool
166GNELaneTemplate::isValid(SumoXMLAttr /*key*/, const std::string& /*value*/) {
167 throw InvalidArgument("cannot be called in templates");
168}
169
170
171bool
173 // All attributes are disabled in templates
174 return false;
175}
176
177
178std::string
180 return myLane->getPopUpID();
181}
182
183
184std::string
188
189// ===========================================================================
190// private
191// ===========================================================================
192
193void
194GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/) {
195 throw InvalidArgument("cannot be called in templates");
196}
197
198/****************************************************************************/
@ SUMO_TAG_LANE
begin/end of the description of a single lane
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Position getCommonAttributePosition(SumoXMLAttr key) const
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
Definition GNELane.cpp:741
std::string getAttribute(SumoXMLAttr key) const override
Definition GNELane.cpp:672
double getAttributeDouble(SumoXMLAttr key) const override
Definition GNELane.cpp:729
GNEHierarchicalElement * getHierarchicalElement() override
methods to retrieve the elements linked to this laneType
void updateGeometry() override
update pre-computed geometry information
bool isAttributeEnabled(SumoXMLAttr key) const override
const GNELane * myLane
pointer to original lane
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
bool isValid(SumoXMLAttr key, const std::string &value) override
~GNELaneTemplate()
Destructor.
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
bool checkDrawOverContour() const override
check if draw over contour (orange)
double getAttributeDouble(SumoXMLAttr key) const override
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
GNEMoveElement * getMoveElement() const override
get GNEMoveElement associated with this laneType
bool checkDrawFromContour() const override
check if draw from contour (green)
bool checkDrawMoveContour() const override
check if draw move contour (red)
GNELaneTemplate(const GNELane *lane)
Constructor.
Position getAttributePosition(SumoXMLAttr key) const override
GUIGlObject * getGUIGlObject() override
get GUIGlObject associated with this AttributeCarrier
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
Parameterised * getParameters() override
get parameters associated with this laneType
bool checkDrawToContour() const override
check if draw from contour (magenta)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
FileBucket * getFileBucket() const override
get reference to fileBucket in which save this AC
std::string getAttribute(SumoXMLAttr key) const override
bool checkDrawSelectContour() const override
check if draw select contour (blue)
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
FileBucket * getFileBucket() const override
get reference to fileBucket in which save this AC
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.