Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEClosingLaneReroute.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"
24#include "GNEAdditionalListed.h"
25
26// ===========================================================================
27// class declarations
28// ===========================================================================
29
30class GNELane;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
41
43 GNEClosingLaneReroute(GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions);
44
47
50
52 GNEMoveElement* getMoveElement() const override;
53
55 Parameterised* getParameters() override;
56
58 const Parameterised* getParameters() const override;
59
61
64
68 void writeAdditional(OutputDevice& device) const;
69
71 bool isAdditionalValid() const;
72
74 std::string getAdditionalProblem() const;
75
78
80
83
85 bool checkDrawMoveContour() const override;
86
88
91
93 void updateGeometry() override;
94
97
99 void updateCenteringBoundary(const bool updateGrid);
100
102 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList);
103
105
108
112 std::string getParentName() const;
113
118 void drawGL(const GUIVisualizationSettings& s) const;
119
121
124
125 /* @brief method for getting the Attribute of an XML key
126 * @param[in] key The attribute key
127 * @return string with the value associated to key
128 */
129 std::string getAttribute(SumoXMLAttr key) const override;
130
131 /* @brief method for getting the Attribute of an XML key in double format
132 * @param[in] key The attribute key
133 * @return double with the value associated to key
134 */
135 double getAttributeDouble(SumoXMLAttr key) const override;
136
137 /* @brief method for getting the Attribute of an XML key in position format
138 * @param[in] key The attribute key
139 * @return position with the value associated to key
140 */
141 Position getAttributePosition(SumoXMLAttr key) const override;
142
143 /* @brief method for getting the Attribute of an XML key in positionVector format
144 * @param[in] key The attribute key
145 * @return positionVector with the value associated to key
146 */
148
149 /* @brief method for setting the attribute and letting the object perform additional changes
150 * @param[in] key The attribute key
151 * @param[in] value The new value
152 * @param[in] undoList The undoList on which to register changes
153 */
154 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
155
156 /* @brief method for checking if the key and their correspond attribute are valids
157 * @param[in] key The attribute key
158 * @param[in] value The value associated to key key
159 * @return true if the value is valid, false in other case
160 */
161 bool isValid(SumoXMLAttr key, const std::string& value) override;
162
164 std::string getPopUpID() const override;
165
167 std::string getHierarchyName() const override;
168
170
171protected:
174
175 // @brief Permissions of This Closing Lane Reroute
177
178private:
180 void setAttribute(SumoXMLAttr key, const std::string& value) override;
181
184
187};
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Position getPositionInView() const
Returns position of additional in view.
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
void updateGeometry() override
update pre-computed geometry information
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
Position getAttributePosition(SumoXMLAttr key) const override
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
double getAttributeDouble(SumoXMLAttr key) const override
bool checkDrawMoveContour() const override
check if draw move contour (red)
Parameterised * getParameters() override
get parameters associated with this closingLaneReroute
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
GNELane * myClosedLane
closed lane
std::string getAttribute(SumoXMLAttr key) const override
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this closingLaneReroute
bool isValid(SumoXMLAttr key, const std::string &value) override
GNEClosingLaneReroute(const GNEClosingLaneReroute &)=delete
Invalidated copy constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
std::string getAdditionalProblem() const
return a string with the current 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...
GNEClosingLaneReroute & operator=(const GNEClosingLaneReroute &)=delete
Invalidated assignment operator.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
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.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.