SUMO - Simulation of Urban MObility
GNEContainerStop.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 GNEContainerStop_h
18 #define GNEContainerStop_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include <config.h>
25 
26 #include <string>
27 #include <vector>
32 #include "GNEStoppingPlace.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
38 
44 
45 public:
57  GNEContainerStop(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);
58 
61 
65  void updateGeometry(bool updateGrid);
67 
70 
74  void drawGL(const GUIVisualizationSettings& s) const;
76 
79  /* @brief method for getting the Attribute of an XML key
80  * @param[in] key The attribute key
81  * @return string with the value associated to key
82  */
83  std::string getAttribute(SumoXMLAttr key) const;
84 
85  /* @brief method for setting the attribute and letting the object perform additional changes
86  * @param[in] key The attribute key
87  * @param[in] value The new value
88  * @param[in] undoList The undoList on which to register changes
89  */
90  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
91 
92  /* @brief method for checking if the key and their correspond attribute are valids
93  * @param[in] key The attribute key
94  * @param[in] value The value asociated to key key
95  * @return true if the value is valid, false in other case
96  */
97  bool isValid(SumoXMLAttr key, const std::string& value);
99 
100 protected:
102  std::vector<std::string> myLines;
103 
104 private:
106  void setAttribute(SumoXMLAttr key, const std::string& value);
107 
109  GNEContainerStop(const GNEContainerStop&) = delete;
110 
112  GNEContainerStop& operator=(const GNEContainerStop&) = delete;
113 };
114 
115 
116 #endif
~GNEContainerStop()
Destructor.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Stores the information about how to visualize structures.
GNEContainerStop(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.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
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.
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry(bool updateGrid)
update pre-computed geometry information
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
GNEContainerStop & operator=(const GNEContainerStop &)=delete
Invalidated assignment operator.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
A lane area vehicles can halt at (netedit-version)