SUMO - Simulation of Urban MObility
GNEBusStop.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // A class for visualizing busStop geometry (adapted from GUILaneWrapper)
16 /****************************************************************************/
17 #ifndef GNEBusStop_h
18 #define GNEBusStop_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include "GNEStoppingPlace.h"
25 
26 
27 // ===========================================================================
28 // class definitions
29 // ===========================================================================
30 
35 class GNEBusStop : public GNEStoppingPlace {
36 
37 public:
49  GNEBusStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector<std::string>& lines, bool friendlyPosition, bool blockMovement);
50 
52  ~GNEBusStop();
53 
57  void updateGeometry(bool updateGrid);
59 
62 
66  void drawGL(const GUIVisualizationSettings& s) const;
68 
71  /* @brief method for getting the Attribute of an XML key
72  * @param[in] key The attribute key
73  * @return string with the value associated to key
74  */
75  std::string getAttribute(SumoXMLAttr key) const;
76 
77  /* @brief method for setting the attribute and letting the object perform additional changes
78  * @param[in] key The attribute key
79  * @param[in] value The new value
80  * @param[in] undoList The undoList on which to register changes
81  */
82  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
83 
84  /* @brief method for checking if the key and their correspond attribute are valids
85  * @param[in] key The attribute key
86  * @param[in] value The value asociated to key key
87  * @return true if the value is valid, false in other case
88  */
89  bool isValid(SumoXMLAttr key, const std::string& value);
91 
92 protected:
94  std::vector<std::string> myLines;
95 
96 private:
98  void setAttribute(SumoXMLAttr key, const std::string& value);
99 
101  GNEBusStop(const GNEBusStop&) = delete;
102 
104  GNEBusStop& operator=(const GNEBusStop&) = delete;
105 };
106 
107 
108 #endif
GNEBusStop & operator=(const GNEBusStop &)=delete
Invalidated assignment operator.
Stores the information about how to visualize structures.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:47
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEBusStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, const std::string &startPos, const std::string &endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Constructor.
Definition: GNEBusStop.cpp:41
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Definition: GNEBusStop.cpp:226
A lane area vehicles can halt at (netedit-version)
Definition: GNEBusStop.h:35
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
Definition: GNEBusStop.h:94
~GNEBusStop()
Destructor.
Definition: GNEBusStop.cpp:47
void updateGeometry(bool updateGrid)
update pre-computed geometry information
Definition: GNEBusStop.cpp:51
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEBusStop.cpp:197
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Definition: GNEBusStop.cpp:258
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEBusStop.cpp:86