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
45
47 const GUIGlObject* getGUIGlObject() const;
48
50 void updateGeometry();
51
53
56
58 bool checkDrawFromContour() const;
59
61 bool checkDrawToContour() const;
62
64 bool checkDrawRelatedContour() const;
65
67 bool checkDrawOverContour() const;
68
70 bool checkDrawDeleteContour() const;
71
73 bool checkDrawDeleteContourSmall() const;
74
76 bool checkDrawSelectContour() const;
77
79 bool checkDrawMoveContour() const;
80
82
85 /* @brief method for getting the Attribute of an XML key
86 * @param[in] key The attribute key
87 * @return string with the value associated to key
88 */
89 std::string getAttribute(SumoXMLAttr key) const;
90
91 /* @brief method for getting the Attribute of an XML key in Position format
92 * @param[in] key The attribute key
93 * @return position with the value associated to key
94 */
96
97 /* @brief method for setting the attribute and letting the object perform additional changes
98 * @param[in] key The attribute key
99 * @param[in] value The new value
100 * @param[in] undoList The undoList on which to register changes
101 */
102 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
103
104 /* @brief method for check if new value for certain attribute is valid
105 * @param[in] key The attribute key
106 * @param[in] value The new value
107 */
108 bool isValid(SumoXMLAttr key, const std::string& value);
109
110 /* @brief method for check if the value for certain attribute is set
111 * @param[in] key The attribute key
112 */
113 bool isAttributeEnabled(SumoXMLAttr key) const;
114
116 std::string getPopUpID() const;
117
119 std::string getHierarchyName() const;
120
122
125
126protected:
129
130private:
132 void setAttribute(SumoXMLAttr key, const std::string& value);
133
136
139};
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 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)
GNELaneTemplate & operator=(const GNELaneTemplate &s)=delete
invalidated assignment operator
bool isValid(SumoXMLAttr key, const std::string &value)
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
GNELaneTemplate(const GNELaneTemplate &s)=delete
invalidated copy constructor
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::map< std::string, std::string > Map
parameters map
A list of positions.