Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
51const GUIGlObject*
53 return nullptr;
54}
55
56
57void
59 throw InvalidArgument("cannot be called in templates");
60}
61
62
63bool
65 return false;
66}
67
68
69bool
71 return false;
72}
73
74
75bool
77 return false;
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
111std::string
115
116
121
122
123void
124GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/, GNEUndoList* /*undoList*/) {
125 throw InvalidArgument("cannot be called in templates");
126}
127
128
129bool
130GNELaneTemplate::isValid(SumoXMLAttr /*key*/, const std::string& /*value*/) {
131 throw InvalidArgument("cannot be called in templates");
132}
133
134
135bool
137 // All attributes are disabled in templates
138 return false;
139}
140
141
142std::string
144 return myLane->getPopUpID();
145}
146
147
148std::string
152
153
158
159// ===========================================================================
160// private
161// ===========================================================================
162
163void
164GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/) {
165 throw InvalidArgument("cannot be called in templates");
166}
167
168/****************************************************************************/
@ SUMO_TAG_LANE
begin/end of the description of a single lane
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
std::string getAttribute(SumoXMLAttr key) const
Definition GNELane.cpp:698
const Parameterised::Map & getACParametersMap() const
get parameters map
Definition GNELane.cpp:900
PositionVector getAttributePositionVector(SumoXMLAttr key) const
Definition GNELane.cpp:755
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool checkDrawDeleteContourSmall() const
check if draw delete contour small (pink/white)
const GNELane * myLane
pointer to original lane
PositionVector getAttributePositionVector(SumoXMLAttr key) const
const Parameterised::Map & getACParametersMap() const
get parameters map
~GNELaneTemplate()
Destructor.
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
void updateGeometry()
update pre-computed geometry information
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
bool isValid(SumoXMLAttr key, const std::string &value)
GNELaneTemplate(const GNELane *lane)
Constructor.
bool checkDrawSelectContour() const
check if draw select contour (blue)
bool checkDrawFromContour() const
check if draw from contour (green)
bool checkDrawToContour() const
check if draw from contour (magenta)
bool checkDrawMoveContour() const
check if draw move contour (red)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
bool checkDrawOverContour() const
check if draw over contour (orange)
bool isAttributeEnabled(SumoXMLAttr key) const
std::string getAttribute(SumoXMLAttr key) const
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::map< std::string, std::string > Map
parameters map
A list of positions.