SUMO - Simulation of Urban MObility
GNEVaporizer.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 GNEVaporizer_h
21 #define GNEVaporizer_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "GNEAdditional.h"
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 
39 class GNEEdge;
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
48 class GNEVaporizer : public GNEAdditional {
49 public:
58  GNEVaporizer(const std::string& id, GNEViewNet* viewNet, GNEEdge* edge, SUMOTime startTime, SUMOTime end, bool blocked);
59 
61  ~GNEVaporizer();
62 
65 
68  void updateGeometry();
69 
72 
76  void writeAdditional(OutputDevice& device, const std::string&);
77 
79  GNEEdge* getEdge() const;
80 
83  void removeEdgeReference();
84 
86  SUMOTime getStartTime() const;
87 
89  SUMOTime getEnd() const;
90 
92  void setStartTime(SUMOTime startTime);
93 
95  void setEndTime(SUMOTime end);
96 
101  const std::string& getParentName() const;
102 
107  void drawGL(const GUIVisualizationSettings& s) const;
109 
112  /* @brief method for getting the Attribute of an XML key
113  * @param[in] key The attribute key
114  * @return string with the value associated to key
115  */
116  std::string getAttribute(SumoXMLAttr key) const;
117 
118  /* @brief method for setting the attribute and letting the object perform additional changes
119  * @param[in] key The attribute key
120  * @param[in] value The new value
121  * @param[in] undoList The undoList on which to register changes
122  */
123  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
124 
125  /* @brief method for checking if the key and their correspond attribute are valids
126  * @param[in] key The attribute key
127  * @param[in] value The value asociated to key key
128  * @return true if the value is valid, false in other case
129  */
130  bool isValid(SumoXMLAttr key, const std::string& value);
132 
133 protected:
136 
139 
142 
143 private:
145  void setAttribute(SumoXMLAttr key, const std::string& value);
146 
148  GNEVaporizer(const GNEVaporizer&);
149 
152 };
153 
154 #endif
155 
156 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:43
void setStartTime(SUMOTime startTime)
set start time
void setEndTime(SUMOTime end)
set end
GNEEdge * getEdge() const
get edge in which the RouteProbe is placed
Stores the information about how to visualize structures.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SUMOTime myEnd
end time in which this vaporizer is placed
Definition: GNEVaporizer.h:141
GNEEdge * myEdge
edge in which this vaporizer is placed
Definition: GNEVaporizer.h:135
std::string getAttribute(SumoXMLAttr key) const
SUMOTime myStartTime
start time of vaporizer
Definition: GNEVaporizer.h:138
GNEVaporizer & operator=(const GNEVaporizer &)
Invalidated assignment operator.
bool isValid(SumoXMLAttr key, const std::string &value)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void moveAdditional(SUMOReal, SUMOReal, GNEUndoList *)
change the position of the RouteProbe geometry
Position getPositionInView() const
Returns position of Vaporizer in view.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:54
GNEVaporizer(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, SUMOTime startTime, SUMOTime end, bool blocked)
Constructor.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:63
SUMOTime getEnd() const
get end
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
SUMOTime getStartTime() const
get start time
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:213
void removeEdgeReference()
remove reference to edge
~GNEVaporizer()
Destructor.
void updateGeometry()
update pre-computed geometry information
const std::string & getParentName() const
Returns the name of the parent object (if any)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.