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// ===========================================================================
28class GNEEdge;
29class GNELaneTemplate;
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
35
36public:
38 GNEEdgeTemplate(const GNEEdge* edge);
39
42
45
47 const std::vector<GNELaneTemplate*>& getLaneTemplates() const;
48
51
54
57
59 const GUIGlObject* getGUIGlObject() const;
60
62 void updateGeometry();
63
65
68
70 bool checkDrawFromContour() const;
71
73 bool checkDrawToContour() const;
74
76 bool checkDrawRelatedContour() const;
77
79 bool checkDrawOverContour() const;
80
82 bool checkDrawDeleteContour() const;
83
85 bool checkDrawDeleteContourSmall() const;
86
88 bool checkDrawSelectContour() const;
89
91 bool checkDrawMoveContour() const;
92
94
97 /* @brief method for getting the Attribute of an XML key
98 * @param[in] key The attribute key
99 * @return string with the value associated to key
100 */
101 std::string getAttribute(SumoXMLAttr key) const;
102
103 /* @brief method for getting the Attribute of an XML key in Position format
104 * @param[in] key The attribute key
105 * @return position with the value associated to key
106 */
108
109 /* @brief method for setting the attribute and letting the object perform additional changes
110 * @param[in] key The attribute key
111 * @param[in] value The new value
112 * @param[in] undoList The undoList on which to register changes
113 */
114 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
115
116 /* @brief method for check if new value for certain attribute is valid
117 * @param[in] key The attribute key
118 * @param[in] value The new value
119 */
120 bool isValid(SumoXMLAttr key, const std::string& value);
121
122 /* @brief method for check if the value for certain attribute is set
123 * @param[in] key The attribute key
124 */
125 bool isAttributeEnabled(SumoXMLAttr key) const;
126
128 std::string getPopUpID() const;
129
131 std::string getHierarchyName() const;
132
134
137
138protected:
141
143 std::vector<GNELaneTemplate*> myLaneTemplates;
144
145private:
147 void setAttribute(SumoXMLAttr key, const std::string& value);
148
151
154};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
bool isAttributeEnabled(SumoXMLAttr key) const
~GNEEdgeTemplate()
Destructor.
GNEEdgeTemplate(const GNEEdgeTemplate &s)=delete
invalidated copy constructor
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
const GNEEdge * myEdge
pointer to original edge
bool checkDrawDeleteContourSmall() const
check if draw delete contour small (pink/white)
bool checkDrawToContour() const
check if draw from contour (magenta)
std::string getAttribute(SumoXMLAttr key) const
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
GNEEdgeTemplate & operator=(const GNEEdgeTemplate &s)=delete
invalidated assignment operator
PositionVector getAttributePositionVector(SumoXMLAttr key) const
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
bool checkDrawFromContour() const
check if draw from contour (green)
bool checkDrawMoveContour() const
check if draw move contour (red)
bool checkDrawOverContour() const
check if draw over contour (orange)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
void updateGeometry()
update pre-computed geometry information
const Parameterised::Map & getACParametersMap() const
get parameters map
bool checkDrawSelectContour() const
check if draw select contour (blue)
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
bool isValid(SumoXMLAttr key, const std::string &value)
void updateLaneTemplates()
update lane templates
std::vector< GNELaneTemplate * > myLaneTemplates
vector with the lane templates of this edge
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::map< std::string, std::string > Map
parameters map
A list of positions.