Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEEdgeRelData.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// class for edge relation data
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include "GNEGenericData.h"
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
33
34public:
37
44 GNEEdgeRelData(GNEDataInterval* dataIntervalParent, GNEEdge* fromEdge, GNEEdge* toEdge,
45 const Parameterised::Map& parameters);
46
49
52 double getColorValue(const GUIVisualizationSettings& s, int activeScheme) const override;
53
55 bool isGenericDataVisible() const override;
56
58 void updateGeometry() override;
59
61 Position getPositionInView() const override;
62
65
68 void writeGenericData(OutputDevice& device) const override;
69
71 bool isGenericDataValid() const override;
72
74 std::string getGenericDataProblem() const override;
75
77 void fixGenericDataProblem() override;
79
82
87 void drawGL(const GUIVisualizationSettings& s) const override;
88
90 Boundary getCenteringBoundary() const override;
91
93
96
98 void computePathElement() override;
99
105 void drawLanePartialGL(const GUIVisualizationSettings& s, const GNESegment* segment, const double offsetFront) const override;
106
112 void drawJunctionPartialGL(const GUIVisualizationSettings& s, const GNESegment* segment, const double offsetFront) const override;
113
115 GNELane* getFirstPathLane() const override;
116
118 GNELane* getLastPathLane() const override;
120
123 /* @brief method for getting the Attribute of an XML key
124 * @param[in] key The attribute key
125 * @return string with the value associated to key
126 */
127 std::string getAttribute(SumoXMLAttr key) const override;
128
129 /* @brief method for getting the Attribute of an XML key in double format (to avoid unnecessary parse<double>(...) for certain attributes)
130 * @param[in] key The attribute key
131 * @return double with the value associated to key
132 */
133 double getAttributeDouble(SumoXMLAttr key) const override;
134
140 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
141
147 bool isValid(SumoXMLAttr key, const std::string& value) override;
148
149 /* @brief method for check if the value for certain attribute is set
150 * @param[in] key The attribute key
151 */
152 bool isAttributeEnabled(SumoXMLAttr key) const override;
153
155 std::string getPopUpID() const override;
156
158 std::string getHierarchyName() const override;
160
161private:
163 void setAttribute(SumoXMLAttr key, const std::string& value) override;
164
167
170};
171
172/****************************************************************************/
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
An Element which don't belong to GNENet but has influence in the simulation.
std::string getGenericDataProblem() const override
return a string with the current data set problem (by default empty, can be reimplemented in children...
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
GNELane * getLastPathLane() const override
get last path lane
void writeGenericData(OutputDevice &device) const override
write data set element into a xml file
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
method for setting the attribute and letting the object perform data set changes
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const override
bool isAttributeEnabled(SumoXMLAttr key) const override
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
void updateGeometry() override
update pre-computed geometry information
GNEEdgeRelData(const GNEEdgeRelData &)=delete
Invalidated copy constructor.
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over junction.
void fixGenericDataProblem() override
fix data set problem (by default throw an exception, has to be reimplemented in children)
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const override
bool isGenericDataVisible() const override
check if current edge rel data is visible
bool isGenericDataValid() const override
check if current data set is valid to be written into XML (by default true, can be reimplemented in c...
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const override
Draws partial object over lane.
RGBColor setColor(const GUIVisualizationSettings &s) const
get edge rel data color
~GNEEdgeRelData()
Destructor.
bool isValid(SumoXMLAttr key, const std::string &value) override
method for checking if the key and their conrrespond attribute are valids
Boundary getCenteringBoundary() const override
GNELane * getFirstPathLane() const override
get first path lane
GNEEdgeRelData & operator=(const GNEEdgeRelData &)=delete
Invalidated assignment operator.
Position getPositionInView() const override
Returns element position in view.
double getAttributeDouble(SumoXMLAttr key) const override
void computePathElement() override
compute pathElement
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.
std::map< std::string, std::string > Map
parameters map
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37