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:
56  GNEVaporizer(GNEViewNet* viewNet, GNEEdge* edge, double startTime, double end);
57 
59  ~GNEVaporizer();
60 
62  void moveAdditionalGeometry(double, double);
63 
65  void commmitAdditionalGeometryMoved(double, double, GNEUndoList*);
66 
69  void updateGeometry();
70 
73 
77  void writeAdditional(OutputDevice& device) const;
78 
81  void removeEdgeReference();
82 
84  double getStartTime() const;
85 
87  double getEnd() const;
88 
90  void setStartTime(double startTime);
91 
93  void setEndTime(double end);
94 
99  const std::string& getParentName() const;
100 
105  void drawGL(const GUIVisualizationSettings& s) const;
107 
110  /* @brief method for getting the Attribute of an XML key
111  * @param[in] key The attribute key
112  * @return string with the value associated to key
113  */
114  std::string getAttribute(SumoXMLAttr key) const;
115 
116  /* @brief method for setting the attribute and letting the object perform additional changes
117  * @param[in] key The attribute key
118  * @param[in] value The new value
119  * @param[in] undoList The undoList on which to register changes
120  */
121  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
122 
123  /* @brief method for checking if the key and their correspond attribute are valids
124  * @param[in] key The attribute key
125  * @param[in] value The value asociated to key key
126  * @return true if the value is valid, false in other case
127  */
128  bool isValid(SumoXMLAttr key, const std::string& value);
130 
131 protected:
133  double myStartTime;
134 
136  double myEnd;
137 
140 
143 
144 private:
146  void setAttribute(SumoXMLAttr key, const std::string& value);
147 
149  GNEVaporizer(const GNEVaporizer&);
150 
153 };
154 
155 #endif
156 
157 /****************************************************************************/
double myStartTime
start time of vaporizer
Definition: GNEVaporizer.h:133
void setEndTime(double end)
set end
void commmitAdditionalGeometryMoved(double, double, GNEUndoList *)
updated geometry changes in the attributes of additional
void setStartTime(double startTime)
set start time
Stores the information about how to visualize structures.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:57
Position getPositionInView() const
Returns position of Vaporizer in view.
double getEnd() const
get end
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
double myEnd
end time in which this vaporizer is placed
Definition: GNEVaporizer.h:136
int myRelativePosition
relative position regarding to other route probes
Definition: GNEVaporizer.h:142
double getStartTime() const
get start time
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
GNEVaporizer(GNEViewNet *viewNet, GNEEdge *edge, double startTime, double end)
Constructor.
void removeEdgeReference()
remove reference to edge
void moveAdditionalGeometry(double, double)
change the position of the RouteProbe geometry
int myNumberOfLanes
number of lanes of edge (To improve efficiency)
Definition: GNEVaporizer.h:139
~GNEVaporizer()
Destructor.
void updateGeometry()
update pre-computed geometry information