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-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#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 checkDrawSelectContour() const;
74
76 bool checkDrawMoveContour() const;
77
79
82 /* @brief method for getting the Attribute of an XML key
83 * @param[in] key The attribute key
84 * @return string with the value associated to key
85 */
86 std::string getAttribute(SumoXMLAttr key) const;
87
88 /* @brief method for getting the Attribute of an XML key in Position format
89 * @param[in] key The attribute key
90 * @return position with the value associated to key
91 */
93
94 /* @brief method for setting the attribute and letting the object perform additional changes
95 * @param[in] key The attribute key
96 * @param[in] value The new value
97 * @param[in] undoList The undoList on which to register changes
98 */
99 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
100
101 /* @brief method for check if new value for certain attribute is valid
102 * @param[in] key The attribute key
103 * @param[in] value The new value
104 */
105 bool isValid(SumoXMLAttr key, const std::string& value);
106
107 /* @brief method for check if the value for certain attribute is set
108 * @param[in] key The attribute key
109 */
110 bool isAttributeEnabled(SumoXMLAttr key) const;
111
113 std::string getPopUpID() const;
114
116 std::string getHierarchyName() const;
117
119
122
123protected:
126
127private:
129 void setAttribute(SumoXMLAttr key, const std::string& value);
130
133
136};
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)
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.