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(), "", false),
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
65 return nullptr;
66}
67
68
69const GUIGlObject*
71 return nullptr;
72}
73
74
75void
77 throw InvalidArgument("cannot be called in templates");
78}
79
80
81bool
83 return false;
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
129std::string
133
134
135double
139
140
145
146
151
152
153void
154GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/, GNEUndoList* /*undoList*/) {
155 throw InvalidArgument("cannot be called in templates");
156}
157
158
159bool
160GNELaneTemplate::isValid(SumoXMLAttr /*key*/, const std::string& /*value*/) {
161 throw InvalidArgument("cannot be called in templates");
162}
163
164
165bool
167 // All attributes are disabled in templates
168 return false;
169}
170
171
172std::string
174 return myLane->getPopUpID();
175}
176
177
178std::string
182
183// ===========================================================================
184// private
185// ===========================================================================
186
187void
188GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/) {
189 throw InvalidArgument("cannot be called in templates");
190}
191
192/****************************************************************************/
@ 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
void updateGeometry() override
update pre-computed geometry information
const GNELane * myLane
pointer to original lane
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
bool isValid(SumoXMLAttr key, const std::string &value) override
PositionVector getAttributePositionVector(SumoXMLAttr key) const
~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
methods to retrieve the elements linked to 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)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
bool isAttributeEnabled(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
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)
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.