Eclipse 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-2019 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 "GNEStoppingPlace.h"
25 
26 
27 // ===========================================================================
28 // class definitions
29 // ===========================================================================
30 
36 
37 public:
49  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);
50 
53 
57  void updateGeometry();
58 
62 
65 
69  void drawGL(const GUIVisualizationSettings& s) const;
71 
74  /* @brief method for getting the Attribute of an XML key
75  * @param[in] key The attribute key
76  * @return string with the value associated to key
77  */
78  std::string getAttribute(SumoXMLAttr key) const;
79 
80  /* @brief method for setting the attribute and letting the object perform additional changes
81  * @param[in] key The attribute key
82  * @param[in] value The new value
83  * @param[in] undoList The undoList on which to register changes
84  */
85  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
86 
87  /* @brief method for checking if the key and their correspond attribute are valids
88  * @param[in] key The attribute key
89  * @param[in] value The value asociated to key key
90  * @return true if the value is valid, false in other case
91  */
92  bool isValid(SumoXMLAttr key, const std::string& value);
94 
95 protected:
97  std::vector<std::string> myLines;
98 
99 private:
101  void setAttribute(SumoXMLAttr key, const std::string& value);
102 
104  GNEContainerStop(const GNEContainerStop&) = delete;
105 
107  GNEContainerStop& operator=(const GNEContainerStop&) = delete;
108 };
109 
110 
111 #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:46
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void updateGeometry()
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)