Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNELaneTemplate.h
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#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
28
30
31public:
33 GNELaneTemplate(const GNELane* lane);
34
37
40
43
45 GNEMoveElement* getMoveElement() const override;
46
48 Parameterised* getParameters() override;
49
51 const Parameterised* getParameters() const override;
52
54
56 FileBucket* getFileBucket() const override;
57
60
62 GUIGlObject* getGUIGlObject() override;
63
65 const GUIGlObject* getGUIGlObject() const override;
66
68 void updateGeometry() override;
69
71
74
76 bool checkDrawFromContour() const override;
77
79 bool checkDrawToContour() const override;
80
82 bool checkDrawRelatedContour() const override;
83
85 bool checkDrawOverContour() const override;
86
88 bool checkDrawDeleteContour() const override;
89
91 bool checkDrawDeleteContourSmall() const override;
92
94 bool checkDrawSelectContour() const override;
95
97 bool checkDrawMoveContour() const override;
98
100
103 /* @brief method for getting the Attribute of an XML key
104 * @param[in] key The attribute key
105 * @return string with the value associated to key
106 */
107 std::string getAttribute(SumoXMLAttr key) const override;
108
109 /* @brief method for getting the Attribute of an XML key in double format
110 * @param[in] key The attribute key
111 * @return double with the value associated to key
112 */
113 double getAttributeDouble(SumoXMLAttr key) const override;
114
115 /* @brief method for getting the Attribute of an XML key in position format
116 * @param[in] key The attribute key
117 * @return position with the value associated to key
118 */
119 Position getAttributePosition(SumoXMLAttr key) const override;
120
121 /* @brief method for getting the Attribute of an XML key in Position format
122 * @param[in] key The attribute key
123 * @return position with the value associated to key
124 */
126
127 /* @brief method for setting the attribute and letting the object perform additional changes
128 * @param[in] key The attribute key
129 * @param[in] value The new value
130 * @param[in] undoList The undoList on which to register changes
131 */
132 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
133
134 /* @brief method for check if new value for certain attribute is valid
135 * @param[in] key The attribute key
136 * @param[in] value The new value
137 */
138 bool isValid(SumoXMLAttr key, const std::string& value) override;
139
140 /* @brief method for check if the value for certain attribute is set
141 * @param[in] key The attribute key
142 */
143 bool isAttributeEnabled(SumoXMLAttr key) const override;
144
146 std::string getPopUpID() const override;
147
149 std::string getHierarchyName() const override;
150
152
153protected:
156
157private:
159 void setAttribute(SumoXMLAttr key, const std::string& value) override;
160
163
166};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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)
GNELaneTemplate & operator=(const GNELaneTemplate &s)=delete
invalidated assignment operator
bool checkDrawMoveContour() const override
check if draw move contour (red)
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)
GNELaneTemplate(const GNELaneTemplate &s)=delete
invalidated copy constructor
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)
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.