Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEClosingReroute.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
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
38
39public:
42
44 GNEClosingReroute(GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions);
45
48
51
53 GNEMoveElement* getMoveElement() const override;
54
56 Parameterised* getParameters() override;
57
59 const Parameterised* getParameters() const override;
60
62
65
69 void writeAdditional(OutputDevice& device) const;
70
72 bool isAdditionalValid() const;
73
75 std::string getAdditionalProblem() const;
76
79
81
84
86 bool checkDrawMoveContour() const override;
87
89
92
94 void updateGeometry() override;
95
98
100 void updateCenteringBoundary(const bool updateGrid);
101
103 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList);
104
106
109
113 std::string getParentName() const;
114
119 void drawGL(const GUIVisualizationSettings& s) const;
120
122
125
126 /* @brief method for getting the Attribute of an XML key
127 * @param[in] key The attribute key
128 * @return string with the value associated to key
129 */
130 std::string getAttribute(SumoXMLAttr key) const override;
131
132 /* @brief method for getting the Attribute of an XML key in double format
133 * @param[in] key The attribute key
134 * @return double with the value associated to key
135 */
136 double getAttributeDouble(SumoXMLAttr key) const override;
137
138 /* @brief method for getting the Attribute of an XML key in position format
139 * @param[in] key The attribute key
140 * @return position with the value associated to key
141 */
142 Position getAttributePosition(SumoXMLAttr key) const override;
143
144 /* @brief method for getting the Attribute of an XML key in positionVector format
145 * @param[in] key The attribute key
146 * @return positionVector with the value associated to key
147 */
149
150 /* @brief method for setting the attribute and letting the object perform additional changes
151 * @param[in] key The attribute key
152 * @param[in] value The new value
153 * @param[in] undoList The undoList on which to register changes
154 */
155 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
156
157 /* @brief method for checking if the key and their correspond attribute are valids
158 * @param[in] key The attribute key
159 * @param[in] value The value associated to key key
160 * @return true if the value is valid, false in other case
161 */
162 bool isValid(SumoXMLAttr key, const std::string& value) override;
163
165 std::string getPopUpID() const override;
166
168 std::string getHierarchyName() const override;
169
171
172protected:
175
176 // @brief permissions of this Closing Reroute
178
179private:
181 void setAttribute(SumoXMLAttr key, const std::string& value) override;
182
185
188};
const SVCPermissions SVCAll
all VClasses are allowed
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SVCPermissions myPermissions
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
double getAttributeDouble(SumoXMLAttr key) const override
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
GNEClosingReroute(const GNEClosingReroute &)=delete
Invalidated copy constructor.
GNEEdge * myClosedEdge
closed edge
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this closingReroute
std::string getParentName() const
Returns the name of the parent object.
void updateGeometry() override
update pre-computed geometry information
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position getAttributePosition(SumoXMLAttr key) const override
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
bool checkDrawMoveContour() const override
check if draw move contour (red)
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
std::string getAttribute(SumoXMLAttr key) const override
GNEClosingReroute & operator=(const GNEClosingReroute &)=delete
Invalidated assignment operator.
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...
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
Parameterised * getParameters() override
get parameters associated with this closingReroute
Position getPositionInView() const
Returns position of additional in view.
~GNEClosingReroute()
destructor
bool isValid(SumoXMLAttr key, const std::string &value) override
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.