SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GNEContainerStop.h
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 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:
69  GNEContainerStop(const std::string& id, GNELane* lane, GNEViewNet* viewNet, SUMOReal startPos, SUMOReal endPos, const std::vector<std::string>& lines, bool blocked);
70 
73 
75  void updateGeometry();
76 
80  void writeAdditional(OutputDevice& device, const std::string&);
81 
83  std::vector<std::string> getLines() const;
84 
87 
91  void drawGL(const GUIVisualizationSettings& s) const;
93 
96  /* @brief method for getting the Attribute of an XML key
97  * @param[in] key The attribute key
98  * @return string with the value associated to key
99  */
100  std::string getAttribute(SumoXMLAttr key) const;
101 
102  /* @brief method for setting the attribute and letting the object perform additional changes
103  * @param[in] key The attribute key
104  * @param[in] value The new value
105  * @param[in] undoList The undoList on which to register changes
106  */
107  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
108 
109  /* @brief method for checking if the key and their correspond attribute are valids
110  * @param[in] key The attribute key
111  * @param[in] value The value asociated to key key
112  * @return true if the value is valid, false in other case
113  */
114  bool isValid(SumoXMLAttr key, const std::string& value);
116 
117 protected:
119  std::vector<std::string> myLines;
120 
121 private:
123  void setAttribute(SumoXMLAttr key, const std::string& value);
124 
127 
130 };
131 
132 
133 #endif
std::vector< std::string > getLines() const
get string vector with the lines of the busStop
~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.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:87
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:55
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
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
#define SUMOReal
Definition: config.h:214
GNEContainerStop(const std::string &id, GNELane *lane, GNEViewNet *viewNet, SUMOReal startPos, SUMOReal endPos, const std::vector< std::string > &lines, bool blocked)
Constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A lane area vehicles can halt at (netedit-version)
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file