Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNERerouterInterval.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 definitions
28// ===========================================================================
29
31
32public:
35
37 GNERerouterInterval(GNEAdditional* rerouterParent, SUMOTime begin, SUMOTime end);
38
41
44
46 GNEMoveElement* getMoveElement() const override;
47
49 Parameterised* getParameters() override;
50
52 const Parameterised* getParameters() const override;
53
55
58
62 void writeAdditional(OutputDevice& device) const override;
63
65 bool isAdditionalValid() const override;
66
68 std::string getAdditionalProblem() const override;
69
71 void fixAdditionalProblem() override;
72
74
77
79 bool checkDrawMoveContour() const override;
80
82
85
87 void updateGeometry() override;
88
90 Position getPositionInView() const override;
91
93 void updateCenteringBoundary(const bool updateGrid) override;
94
96 void splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement, const GNENetworkElement* newElement, GNEUndoList* undoList) override;
97
99
102
106 std::string getParentName() const override;
107
112 void drawGL(const GUIVisualizationSettings& s) const override;
113
115
118
119 /* @brief method for getting the Attribute of an XML key
120 * @param[in] key The attribute key
121 * @return string with the value associated to key
122 */
123 std::string getAttribute(SumoXMLAttr key) const override;
124
125 /* @brief method for getting the Attribute of an XML key in double format
126 * @param[in] key The attribute key
127 * @return double with the value associated to key
128 */
129 double getAttributeDouble(SumoXMLAttr key) const override;
130
131 /* @brief method for getting the Attribute of an XML key in position format
132 * @param[in] key The attribute key
133 * @return position with the value associated to key
134 */
135 Position getAttributePosition(SumoXMLAttr key) const override;
136
137 /* @brief method for getting the Attribute of an XML key in positionVector format
138 * @param[in] key The attribute key
139 * @return positionVector with the value associated to key
140 */
142
143 /* @brief method for setting the attribute and letting the object perform additional changes
144 * @param[in] key The attribute key
145 * @param[in] value The new value
146 * @param[in] undoList The undoList on which to register changes
147 */
148 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
149
150 /* @brief method for checking if the key and their correspond attribute are valids
151 * @param[in] key The attribute key
152 * @param[in] value The value associated to key key
153 * @return true if the value is valid, false in other case
154 */
155 bool isValid(SumoXMLAttr key, const std::string& value) override;
156
158 std::string getPopUpID() const override;
159
161 std::string getHierarchyName() const override;
162
164
165protected:
168
171
172private:
174 void setAttribute(SumoXMLAttr key, const std::string& value) override;
175
178
181};
long long int SUMOTime
Definition GUI.h:36
const std::string invalid_return< std::string >::value
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
friend class GNEAdditionalListed
declare friend class
GNEAdditional(const std::string &id, GNENet *net, const std::string &filename, SumoXMLTag tag, const std::string &additionalName)
Constructor.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
void writeAdditional(OutputDevice &device) const override
write additional element into a xml file
bool checkDrawMoveContour() const override
check if draw move contour (red)
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
bool isValid(SumoXMLAttr key, const std::string &value) override
Position getPositionInView() const override
Returns position of additional in view.
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList) override
split geometry
void updateGeometry() override
update pre-computed geometry information
bool isAdditionalValid() const override
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
std::string getParentName() const override
Returns the name of the parent object.
std::string getAttribute(SumoXMLAttr key) const override
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this rerouterInterval
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
GNERerouterInterval & operator=(GNERerouterInterval *)=delete
Invalidated assignment operator.
std::string getAdditionalProblem() const override
return a string with the current additional problem (must be reimplemented in all detector children)
void updateCenteringBoundary(const bool updateGrid) override
update centering boundary (implies change in RTREE)
GNERerouterInterval(GNERerouterInterval *)=delete
Invalidated copy constructor.
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
Position getAttributePosition(SumoXMLAttr key) const override
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
SUMOTime myEnd
end timeStep
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
void fixAdditionalProblem() override
fix additional problem (must be reimplemented in all detector children)
Parameterised * getParameters() override
get parameters associated with this rerouterInterval
double getAttributeDouble(SumoXMLAttr key) const override
SUMOTime myBegin
begin timeStep
GNERerouterInterval(GNENet *net)
default constructor
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.