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 
71  void updateGeometry();
72 
75 
79  void writeAdditional(OutputDevice& device, const std::string&);
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 
140 private:
142  void setAttribute(SumoXMLAttr key, const std::string& value);
143 
145  GNEVaporizer(const GNEVaporizer&);
146 
149 };
150 
151 #endif
152 
153 /****************************************************************************/
long long int SUMOTime
Definition: SUMOTime.h:43
void setStartTime(SUMOTime startTime)
set start time
void commmitAdditionalGeometryMoved(SUMOReal, SUMOReal, GNEUndoList *)
updated geometry changes in the attributes of additional
void moveAdditionalGeometry(SUMOReal, SUMOReal)
change the position of the RouteProbe geometry
void setEndTime(SUMOTime end)
set end
Stores the information about how to visualize structures.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SUMOTime myEnd
end time in which this vaporizer is placed
Definition: GNEVaporizer.h:138
SUMOTime myStartTime
start time of vaporizer
Definition: GNEVaporizer.h:135
GNEVaporizer & operator=(const GNEVaporizer &)
Invalidated assignment operator.
const std::string & getParentName() const
Returns the name of the parent object (if any)
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
std::string getAttribute(SumoXMLAttr key) const
SUMOTime getStartTime() const
get start time
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:55
GNEVaporizer(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, SUMOTime startTime, SUMOTime end, bool blocked)
Constructor.
Position getPositionInView() const
Returns position of Vaporizer in view.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:63
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
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.
SUMOTime getEnd() const
get end
void updateGeometry()
update pre-computed geometry information