SUMO - Simulation of Urban MObility
GNEContainerStop.h
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNEContainerStop_h
21 #define GNEContainerStop_h
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <vector>
38 #include "GNEAttributeCarrier.h"
39 #include "GNEStoppingPlace.h"
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 
46 class PositionVector;
47 class GNELane;
48 class GNENet;
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
53 
59 public:
68  GNEContainerStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double startPos, double endPos, const std::vector<std::string>& lines);
69 
72 
74  void updateGeometry();
75 
79  void writeAdditional(OutputDevice& device) const;
80 
82  std::vector<std::string> getLines() const;
83 
86 
90  void drawGL(const GUIVisualizationSettings& s) const;
92 
95  /* @brief method for getting the Attribute of an XML key
96  * @param[in] key The attribute key
97  * @return string with the value associated to key
98  */
99  std::string getAttribute(SumoXMLAttr key) const;
100 
101  /* @brief method for setting the attribute and letting the object perform additional changes
102  * @param[in] key The attribute key
103  * @param[in] value The new value
104  * @param[in] undoList The undoList on which to register changes
105  */
106  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
107 
108  /* @brief method for checking if the key and their correspond attribute are valids
109  * @param[in] key The attribute key
110  * @param[in] value The value asociated to key key
111  * @return true if the value is valid, false in other case
112  */
113  bool isValid(SumoXMLAttr key, const std::string& value);
115 
116 protected:
118  std::vector<std::string> myLines;
119 
120 private:
122  void setAttribute(SumoXMLAttr key, const std::string& value);
123 
126 
129 };
130 
131 
132 #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.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< std::string > getLines() const
get string vector with the lines of the busStop
std::string getAttribute(SumoXMLAttr key) const
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double startPos, double endPos, const std::vector< std::string > &lines)
Constructor.
void updateGeometry()
update pre-computed geometry information
A list of positions.
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
GNEContainerStop & operator=(const GNEContainerStop &)
Invalidated assignment operator.
The popup menu of a globject.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
A lane area vehicles can halt at (netedit-version)