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-2024 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#include <config.h>
21
23
24#include "GNELaneTemplate.h"
25
26// ===========================================================================
27// members methods
28// ===========================================================================
29
31 GNEAttributeCarrier(SUMO_TAG_LANE, lane->getNet()),
32 myLane(lane) {
33}
34
35
38
39
42 return nullptr;
43}
44
45
48 return nullptr;
49}
50
51
52const GUIGlObject*
54 return nullptr;
55}
56
57
58void
60 throw InvalidArgument("cannot be called in templates");
61}
62
63
64bool
66 return false;
67}
68
69
70bool
72 return false;
73}
74
75
76bool
78 return false;
79}
80
81
82bool
84 return false;
85}
86
87
88bool
90 return false;
91}
92
93
94bool
96 return false;
97}
98
99
100bool
102 return false;
103}
104
105
106std::string
110
111
116
117
118void
119GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/, GNEUndoList* /*undoList*/) {
120 throw InvalidArgument("cannot be called in templates");
121}
122
123
124bool
125GNELaneTemplate::isValid(SumoXMLAttr /*key*/, const std::string& /*value*/) {
126 throw InvalidArgument("cannot be called in templates");
127}
128
129
130bool
132 // All attributes are disabled in templates
133 return false;
134}
135
136
137std::string
139 return myLane->getPopUpID();
140}
141
142
143std::string
147
148
153
154// ===========================================================================
155// private
156// ===========================================================================
157
158void
159GNELaneTemplate::setAttribute(SumoXMLAttr /*key*/, const std::string& /*value*/) {
160 throw InvalidArgument("cannot be called in templates");
161}
162
163/****************************************************************************/
@ 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:668
const Parameterised::Map & getACParametersMap() const
get parameters map
Definition GNELane.cpp:880
PositionVector getAttributePositionVector(SumoXMLAttr key) const
Definition GNELane.cpp:729
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
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.