Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEEdgeTemplate.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 edges
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28
29class GNEEdge;
30class GNELaneTemplate;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
40 GNEEdgeTemplate(const GNEEdge* edge);
41
44
47
50
52 GNEMoveElement* getMoveElement() const override;
53
55 Parameterised* getParameters() override;
56
58 const Parameterised* getParameters() const override;
59
61
63 FileBucket* getFileBucket() const override;
64
66 const std::vector<GNELaneTemplate*>& getLaneTemplates() const;
67
70
73
75 GUIGlObject* getGUIGlObject() override;
76
78 const GUIGlObject* getGUIGlObject() const override;
79
81 void updateGeometry() override;
82
84
87
89 bool checkDrawFromContour() const override;
90
92 bool checkDrawToContour() const override;
93
95 bool checkDrawRelatedContour() const override;
96
98 bool checkDrawOverContour() const override;
99
101 bool checkDrawDeleteContour() const override;
102
104 bool checkDrawDeleteContourSmall() const override;
105
107 bool checkDrawSelectContour() const override;
108
110 bool checkDrawMoveContour() const override;
111
113
116 /* @brief method for getting the Attribute of an XML key
117 * @param[in] key The attribute key
118 * @return string with the value associated to key
119 */
120 std::string getAttribute(SumoXMLAttr key) const override;
121
122 /* @brief method for getting the Attribute of an XML key in double format
123 * @param[in] key The attribute key
124 * @return double with the value associated to key
125 */
126 double getAttributeDouble(SumoXMLAttr key) const override;
127
128 /* @brief method for getting the Attribute of an XML key in position format
129 * @param[in] key The attribute key
130 * @return position with the value associated to key
131 */
132 Position getAttributePosition(SumoXMLAttr key) const override;
133
134 /* @brief method for getting the Attribute of an XML key in Position format
135 * @param[in] key The attribute key
136 * @return position with the value associated to key
137 */
139
140 /* @brief method for setting the attribute and letting the object perform additional changes
141 * @param[in] key The attribute key
142 * @param[in] value The new value
143 * @param[in] undoList The undoList on which to register changes
144 */
145 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
146
147 /* @brief method for check if new value for certain attribute is valid
148 * @param[in] key The attribute key
149 * @param[in] value The new value
150 */
151 bool isValid(SumoXMLAttr key, const std::string& value) override;
152
153 /* @brief method for check if the value for certain attribute is set
154 * @param[in] key The attribute key
155 */
156 bool isAttributeEnabled(SumoXMLAttr key) const override;
157
159 std::string getPopUpID() const override;
160
162 std::string getHierarchyName() const override;
163
165
166protected:
169
171 std::vector<GNELaneTemplate*> myLaneTemplates;
172
173private:
175 void setAttribute(SumoXMLAttr key, const std::string& value) override;
176
179
182};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
bool checkDrawFromContour() const override
check if draw from contour (green)
~GNEEdgeTemplate()
Destructor.
GNEEdgeTemplate(const GNEEdgeTemplate &s)=delete
invalidated copy constructor
bool checkDrawSelectContour() const override
check if draw select contour (blue)
const GNEEdge * myEdge
pointer to original edge
bool checkDrawToContour() const override
check if draw from contour (magenta)
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
Parameterised * getParameters() override
get parameters associated with this edgeTemplate
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
GNEEdgeTemplate & operator=(const GNEEdgeTemplate &s)=delete
invalidated assignment operator
bool isValid(SumoXMLAttr key, const std::string &value) override
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
bool isAttributeEnabled(SumoXMLAttr key) const override
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
bool checkDrawOverContour() const override
check if draw over contour (orange)
bool checkDrawMoveContour() const override
check if draw move contour (red)
std::string getAttribute(SumoXMLAttr key) const override
GNEMoveElement * getMoveElement() const override
get GNEMoveElement associated with this edgeTemplate
void updateGeometry() override
update pre-computed geometry information
Position getAttributePosition(SumoXMLAttr key) const override
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
GNEHierarchicalElement * getHierarchicalElement() override
methods to retrieve the elements linked to this edgeTemplate
GUIGlObject * getGUIGlObject() override
get GUIGlObject associated with this AttributeCarrier
FileBucket * getFileBucket() const override
get reference to fileBucket in which save this AC
double getAttributeDouble(SumoXMLAttr key) const override
void updateLaneTemplates()
update lane templates
std::vector< GNELaneTemplate * > myLaneTemplates
vector with the lane templates of this edge
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.