Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEVariableSpeedSign.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//
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include "GNEAdditional.h"
25
26// ===========================================================================
27// class declarations
28// ===========================================================================
29
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
41
51 GNEVariableSpeedSign(const std::string& id, GNENet* net, const std::string& filename, const Position& pos,
52 const std::string& name, const std::vector<std::string>& vTypes,
53 const Parameterised::Map& parameters);
54
57
60
62 GNEMoveElement* getMoveElement() const override;
63
65 Parameterised* getParameters() override;
66
68 const Parameterised* getParameters() const override;
69
71
74
78 void writeAdditional(OutputDevice& device) const;
79
81 bool isAdditionalValid() const;
82
84 std::string getAdditionalProblem() const;
85
88
90
93
95 bool checkDrawMoveContour() const override;
96
98
101
104
106 void updateGeometry() override;
107
110
112 void updateCenteringBoundary(const bool updateGrid);
113
115 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList);
116
118
121
125 std::string getParentName() const;
126
131 void drawGL(const GUIVisualizationSettings& s) const;
132
134
137
138 /* @brief method for getting the Attribute of an XML key
139 * @param[in] key The attribute key
140 * @return string with the value associated to key
141 */
142 std::string getAttribute(SumoXMLAttr key) const override;
143
144 /* @brief method for getting the Attribute of an XML key in double format
145 * @param[in] key The attribute key
146 * @return double with the value associated to key
147 */
148 double getAttributeDouble(SumoXMLAttr key) const override;
149
150 /* @brief method for getting the Attribute of an XML key in position format
151 * @param[in] key The attribute key
152 * @return position with the value associated to key
153 */
154 Position getAttributePosition(SumoXMLAttr key) const override;
155
156 /* @brief method for getting the Attribute of an XML key in positionVector format
157 * @param[in] key The attribute key
158 * @return positionVector with the value associated to key
159 */
161
162 /* @brief method for setting the attribute and letting the object perform additional changes
163 * @param[in] key The attribute key
164 * @param[in] value The new value
165 * @param[in] undoList The undoList on which to register changes
166 */
167 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
168
169 /* @brief method for checking if the key and their correspond attribute are valids
170 * @param[in] key The attribute key
171 * @param[in] value The value associated to key key
172 * @return true if the value is valid, false in other case
173 */
174 bool isValid(SumoXMLAttr key, const std::string& value) override;
175
177 std::string getPopUpID() const override;
178
180 std::string getHierarchyName() const override;
181
183
184protected:
186 std::vector<std::string> myVehicleTypes;
187
188private:
190 void setAttribute(SumoXMLAttr key, const std::string& value) override;
191
193 void rebuildVSSSymbols(const std::string& value, GNEUndoList* undoList);
194
197
200};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
void updateGeometry() override
update pre-computed geometry information
Position getAttributePosition(SumoXMLAttr key) const override
Parameterised * getParameters() override
get parameters associated with this variableSpeedSign
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
Position getPositionInView() const
Returns position of additional in view.
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
std::string getAdditionalProblem() const
return a string with the current additional problem (must be reimplemented in all detector children)
GNEVariableSpeedSign(const GNEVariableSpeedSign &)=delete
Invalidated copy constructor.
double getAttributeDouble(SumoXMLAttr key) const override
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void rebuildVSSSymbols(const std::string &value, GNEUndoList *undoList)
rebuild VSS Symbols
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const override
bool checkDrawMoveContour() const override
check if draw move contour (red)
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this variableSpeedSign
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
bool isValid(SumoXMLAttr key, const std::string &value) override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
GNEVariableSpeedSign & operator=(const GNEVariableSpeedSign &)=delete
Invalidated assignment operator.
void openAdditionalDialog()
open GNEVariableSpeedSignDialog
std::vector< std::string > myVehicleTypes
attribute vehicle types
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
bool isAdditionalValid() const
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
Stores the information about how to visualize structures.
Static storage of an output device and its base (abstract) implementation.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.