SUMO - Simulation of Urban MObility
GNEVaporizer.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 //
18 /****************************************************************************/
19 #ifndef GNEVaporizer_h
20 #define GNEVaporizer_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include "GNEAdditional.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 class GNEVaporizer : public GNEAdditional {
43 
44 public:
51  GNEVaporizer(GNEViewNet* viewNet, GNEEdge* edge, double startTime, double end);
52 
54  ~GNEVaporizer();
55 
59  void writeAdditional(OutputDevice& device) const;
60 
63 
67  void moveGeometry(const Position& oldPos, const Position& offset);
68 
73  void commitGeometryMoving(const Position& oldPos, GNEUndoList* undoList);
74 
76  void updateGeometry();
77 
81 
86  const std::string& getParentName() const;
87 
92  void drawGL(const GUIVisualizationSettings& s) const;
94 
97  /* @brief method for getting the Attribute of an XML key
98  * @param[in] key The attribute key
99  * @return string with the value associated to key
100  */
101  std::string getAttribute(SumoXMLAttr key) const;
102 
103  /* @brief method for setting the attribute and letting the object perform additional changes
104  * @param[in] key The attribute key
105  * @param[in] value The new value
106  * @param[in] undoList The undoList on which to register changes
107  */
108  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
109 
110  /* @brief method for checking if the key and their correspond attribute are valids
111  * @param[in] key The attribute key
112  * @param[in] value The value asociated to key key
113  * @return true if the value is valid, false in other case
114  */
115  bool isValid(SumoXMLAttr key, const std::string& value);
117 
118 protected:
121 
123  double myStartTime;
124 
126  double myEnd;
127 
130 
133 
134 private:
136  void setAttribute(SumoXMLAttr key, const std::string& value);
137 
139  GNEVaporizer(const GNEVaporizer&);
140 
143 };
144 
145 #endif
146 
147 /****************************************************************************/
double myStartTime
start time of vaporizer
Definition: GNEVaporizer.h:123
int myRelativePositionY
relative position regarding to other route probes
Definition: GNEVaporizer.h:132
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.
GNEEdge * myEdge
The edge in which this vaporizer is placed.
Definition: GNEVaporizer.h:120
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:45
Representation of a vaporizer in netedit.
Definition: GNEVaporizer.h:42
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:56
Position getPositionInView() const
Returns position of additional 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:59
double myEnd
end time in which this vaporizer is placed
Definition: GNEVaporizer.h:126
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
GNEVaporizer(GNEViewNet *viewNet, GNEEdge *edge, double startTime, double end)
Constructor.
int myNumberOfLanes
number of lanes of edge (To improve efficiency)
Definition: GNEVaporizer.h:129
~GNEVaporizer()
Destructor.
void updateGeometry()
update pre-computed geometry information