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 /****************************************************************************/
14 // A class for visualizing busStop geometry (adapted from GUILaneWrapper)
15 /****************************************************************************/
16 #ifndef GNEContainerStop_h
17 #define GNEContainerStop_h
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 
23 #include "GNEStoppingPlace.h"
24 
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
29 
35 
36 public:
48  GNEContainerStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, const double startPos, const double endPos, const int parametersSet,
49  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);
93 
95 
96 protected:
98  std::vector<std::string> myLines;
99 
100 private:
102  void setAttribute(SumoXMLAttr key, const std::string& value);
103 
106 
109 };
110 
111 
112 #endif
GNEContainerStop::GNEContainerStop
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, const double startPos, const double endPos, const int parametersSet, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Constructor.
Definition: GNEContainerStop.cpp:40
GNEContainerStop::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Definition: GNEContainerStop.cpp:232
GNEContainerStop::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEContainerStop.cpp:82
GNEViewNet
Definition: GNEViewNet.h:42
GNEContainerStop::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GNEContainerStop.cpp:76
GNEContainerStop::isValid
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Definition: GNEContainerStop.cpp:256
GNEStoppingPlace
Definition: GNEStoppingPlace.h:39
GNEContainerStop::operator=
GNEContainerStop & operator=(const GNEContainerStop &)=delete
Invalidated assignment operator.
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GNEContainerStop::getAttribute
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEContainerStop.cpp:195
GNEContainerStop::GNEContainerStop
GNEContainerStop(const GNEContainerStop &)=delete
Invalidated copy constructor.
GNEContainerStop::updateGeometry
void updateGeometry()
update pre-computed geometry information
Definition: GNEContainerStop.cpp:51
GNEStoppingPlace.h
GNEContainerStop::~GNEContainerStop
~GNEContainerStop()
Destructor.
Definition: GNEContainerStop.cpp:47
GNEContainerStop::myLines
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
Definition: GNEContainerStop.h:98
GNEContainerStop
A lane area vehicles can halt at (netedit-version)
Definition: GNEContainerStop.h:34
GNEUndoList
Definition: GNEUndoList.h:48
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45