Eclipse SUMO - Simulation of Urban MObility
GNELaneTemplate.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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 void updateGeometry();
48
50
53 /* @brief method for getting the Attribute of an XML key
54 * @param[in] key The attribute key
55 * @return string with the value associated to key
56 */
57 std::string getAttribute(SumoXMLAttr key) const;
58
59 /* @brief method for setting the attribute and letting the object perform additional changes
60 * @param[in] key The attribute key
61 * @param[in] value The new value
62 * @param[in] undoList The undoList on which to register changes
63 */
64 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
65
66 /* @brief method for check if new value for certain attribute is valid
67 * @param[in] key The attribute key
68 * @param[in] value The new value
69 */
70 bool isValid(SumoXMLAttr key, const std::string& value);
71
72 /* @brief method for check if the value for certain attribute is set
73 * @param[in] key The attribute key
74 */
75 bool isAttributeEnabled(SumoXMLAttr key) const;
76
78 std::string getPopUpID() const;
79
81 std::string getHierarchyName() const;
82
84
87
88protected:
91
92private:
94 void setAttribute(SumoXMLAttr key, const std::string& value);
95
97 GNELaneTemplate(const GNELaneTemplate& s) = delete;
98
101};
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
const Parameterised::Map & getACParametersMap() const
get parameters map
~GNELaneTemplate()
Destructor.
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
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)
GNELaneTemplate(const GNELane *lane)
Constructor.
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
GNELaneTemplate(const GNELaneTemplate &s)=delete
invalidated copy constructor
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
Definition: Parameterised.h:45