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// ===========================================================================
29
30public:
32 GNELaneTemplate(const GNELane* lane);
33
36
39
42
44 GNEMoveElement* getMoveElement() const override;
45
47 Parameterised* getParameters() override;
48
50 const Parameterised* getParameters() const override;
51
53
56
58 GUIGlObject* getGUIGlObject() override;
59
61 const GUIGlObject* getGUIGlObject() const override;
62
64 void updateGeometry() override;
65
67
70
72 bool checkDrawFromContour() const override;
73
75 bool checkDrawToContour() const override;
76
78 bool checkDrawRelatedContour() const override;
79
81 bool checkDrawOverContour() const override;
82
84 bool checkDrawDeleteContour() const override;
85
87 bool checkDrawDeleteContourSmall() const override;
88
90 bool checkDrawSelectContour() const override;
91
93 bool checkDrawMoveContour() const override;
94
96
99 /* @brief method for getting the Attribute of an XML key
100 * @param[in] key The attribute key
101 * @return string with the value associated to key
102 */
103 std::string getAttribute(SumoXMLAttr key) const override;
104
105 /* @brief method for getting the Attribute of an XML key in double format
106 * @param[in] key The attribute key
107 * @return double with the value associated to key
108 */
109 double getAttributeDouble(SumoXMLAttr key) const override;
110
111 /* @brief method for getting the Attribute of an XML key in position format
112 * @param[in] key The attribute key
113 * @return position with the value associated to key
114 */
115 Position getAttributePosition(SumoXMLAttr key) const override;
116
117 /* @brief method for getting the Attribute of an XML key in Position format
118 * @param[in] key The attribute key
119 * @return position with the value associated to key
120 */
122
123 /* @brief method for setting the attribute and letting the object perform additional changes
124 * @param[in] key The attribute key
125 * @param[in] value The new value
126 * @param[in] undoList The undoList on which to register changes
127 */
128 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
129
130 /* @brief method for check if new value for certain attribute is valid
131 * @param[in] key The attribute key
132 * @param[in] value The new value
133 */
134 bool isValid(SumoXMLAttr key, const std::string& value) override;
135
136 /* @brief method for check if the value for certain attribute is set
137 * @param[in] key The attribute key
138 */
139 bool isAttributeEnabled(SumoXMLAttr key) const;
140
142 std::string getPopUpID() const override;
143
145 std::string getHierarchyName() const override;
146
148
149protected:
152
153private:
155 void setAttribute(SumoXMLAttr key, const std::string& value) override;
156
159
162};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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)
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)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
GNELaneTemplate(const GNELaneTemplate &s)=delete
invalidated copy constructor
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)
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.