Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEContainerStop.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// A class for visualizing busStop geometry (adapted from GUILaneWrapper)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include "GNEStoppingPlace.h"
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
28
30
31public:
34
51 GNEContainerStop(const std::string& id, GNENet* net, const std::string& filename, GNELane* lane,
52 const double startPos, const double endPos, const std::string& name, const std::vector<std::string>& lines,
53 const int containerCapacity, const double parkingLength, const RGBColor& color, const bool friendlyPosition,
54 const double angle, const Parameterised::Map& parameters);
55
58
62 void writeAdditional(OutputDevice& device) const;
63
66
68 void updateGeometry() override;
69
71
74
78 void drawGL(const GUIVisualizationSettings& s) const;
79
81
84
85 /* @brief method for getting the Attribute of an XML key
86 * @param[in] key The attribute key
87 * @return string with the value associated to key
88 */
89 std::string getAttribute(SumoXMLAttr key) const override;
90
91 /* @brief method for getting the Attribute of an XML key in double format
92 * @param[in] key The attribute key
93 * @return double with the value associated to key
94 */
95 double getAttributeDouble(SumoXMLAttr key) const override;
96
97 /* @brief method for setting the attribute and letting the object perform additional changes
98 * @param[in] key The attribute key
99 * @param[in] value The new value
100 * @param[in] undoList The undoList on which to register changes
101 */
102 void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) override;
103
104 /* @brief method for checking if the key and their correspond attribute are valids
105 * @param[in] key The attribute key
106 * @param[in] value The value associated to key key
107 * @return true if the value is valid, false in other case
108 */
109 bool isValid(SumoXMLAttr key, const std::string& value) override;
110
112
113protected:
115 std::vector<std::string> myLines;
116
119
122
123private:
125 void setAttribute(SumoXMLAttr key, const std::string& value) override;
126
129
132};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEContainerStop(const GNEContainerStop &)=delete
Invalidated copy constructor.
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
int myContainerCapacity
maximum number of container that can wait at this stop
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
std::string getAttribute(SumoXMLAttr key) const override
double getAttributeDouble(SumoXMLAttr key) const override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
GNEContainerStop & operator=(const GNEContainerStop &)=delete
Invalidated assignment operator.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool isValid(SumoXMLAttr key, const std::string &value) override
~GNEContainerStop()
Destructor.
double myParkingLength
custom space for vehicles that park at this stop
void updateGeometry() override
update pre-computed geometry information
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