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.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 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:
57  GNEVaporizer(const std::string& id, GNEViewNet* viewNet, GNEEdge* edge, SUMOReal startTime, SUMOReal end);
58 
60  ~GNEVaporizer();
61 
64 
67 
70  void updateGeometry();
71 
74 
78  void writeAdditional(OutputDevice& device) const;
79 
82  void removeEdgeReference();
83 
85  SUMOReal getStartTime() const;
86 
88  SUMOReal getEnd() const;
89 
91  void setStartTime(SUMOReal startTime);
92 
94  void setEndTime(SUMOReal end);
95 
100  const std::string& getParentName() const;
101 
106  void drawGL(const GUIVisualizationSettings& s) const;
108 
111  /* @brief method for getting the Attribute of an XML key
112  * @param[in] key The attribute key
113  * @return string with the value associated to key
114  */
115  std::string getAttribute(SumoXMLAttr key) const;
116 
117  /* @brief method for setting the attribute and letting the object perform additional changes
118  * @param[in] key The attribute key
119  * @param[in] value The new value
120  * @param[in] undoList The undoList on which to register changes
121  */
122  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
123 
124  /* @brief method for checking if the key and their correspond attribute are valids
125  * @param[in] key The attribute key
126  * @param[in] value The value asociated to key key
127  * @return true if the value is valid, false in other case
128  */
129  bool isValid(SumoXMLAttr key, const std::string& value);
131 
132 protected:
135 
138 
139 private:
141  void setAttribute(SumoXMLAttr key, const std::string& value);
142 
144  GNEVaporizer(const GNEVaporizer&);
145 
148 };
149 
150 #endif
151 
152 /****************************************************************************/
void commmitAdditionalGeometryMoved(SUMOReal, SUMOReal, GNEUndoList *)
updated geometry changes in the attributes of additional
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
void moveAdditionalGeometry(SUMOReal, SUMOReal)
change the position of the RouteProbe geometry
SUMOReal getStartTime() const
get start time
Stores the information about how to visualize structures.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
GNEVaporizer(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, SUMOReal startTime, SUMOReal end)
Constructor.
GNEVaporizer & operator=(const GNEVaporizer &)
Invalidated assignment operator.
SUMOReal getEnd() const
get end
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
SUMOReal myStartTime
start time of vaporizer
Definition: GNEVaporizer.h:134
SUMOReal myEnd
end time in which this vaporizer is placed
Definition: GNEVaporizer.h:137
Position getPositionInView() const
Returns position of Vaporizer in view.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:54
void setStartTime(SUMOReal startTime)
set start time
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:62
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:208
void setEndTime(SUMOReal end)
set end
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.