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-2023 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
56
58 void updateGeometry();
59
61
64 /* @brief method for getting the Attribute of an XML key
65 * @param[in] key The attribute key
66 * @return string with the value associated to key
67 */
68 std::string getAttribute(SumoXMLAttr key) const;
69
70 /* @brief method for setting the attribute and letting the object perform additional changes
71 * @param[in] key The attribute key
72 * @param[in] value The new value
73 * @param[in] undoList The undoList on which to register changes
74 */
75 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
76
77 /* @brief method for check if new value for certain attribute is valid
78 * @param[in] key The attribute key
79 * @param[in] value The new value
80 */
81 bool isValid(SumoXMLAttr key, const std::string& value);
82
83 /* @brief method for check if the value for certain attribute is set
84 * @param[in] key The attribute key
85 */
86 bool isAttributeEnabled(SumoXMLAttr key) const;
87
89 std::string getPopUpID() const;
90
92 std::string getHierarchyName() const;
93
95
98
99protected:
102
104 std::vector<GNELaneTemplate*> myLaneTemplates;
105
106private:
108 void setAttribute(SumoXMLAttr key, const std::string& value);
109
112
115};
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
std::string getAttribute(SumoXMLAttr key) const
GUIGlObject * getGUIGlObject()
GNEEdgeTemplate & operator=(const GNEEdgeTemplate &s)=delete
invalidated assignment operator
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
void updateGeometry()
update pre-computed geometry information
const Parameterised::Map & getACParametersMap() const
get parameters map
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