SUMO - Simulation of Urban MObility
GNEDetectorExit.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 GNEDetectorExit_h
21 #define GNEDetectorExit_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 "GNEDetector.h"
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class GNEDetectorE3;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 class GNEDetectorExit : public GNEDetector {
48 public:
55  GNEDetectorExit(GNEViewNet* viewNet, GNEDetectorE3* parent, GNELane* lane, double pos);
56 
59 
62  void updateGeometry();
63 
66 
68  GNEDetectorE3* getE3Parent() const;
69 
73  void writeAdditional(OutputDevice& device) const;
74 
77 
80 
84  void drawGL(const GUIVisualizationSettings& s) const;
86 
89  /* @brief method for getting the Attribute of an XML key
90  * @param[in] key The attribute key
91  * @return string with the value associated to key
92  */
93  std::string getAttribute(SumoXMLAttr key) const;
94 
95  /* @brief method for setting the attribute and letting the object perform additional changes
96  * @param[in] key The attribute key
97  * @param[in] value The new value
98  * @param[in] undoList The undoList on which to register changes
99  */
100  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
101 
102  /* @brief method for checking if the key and their correspond attribute are valids
103  * @param[in] key The attribute key
104  * @param[in] value The value asociated to key key
105  * @return true if the value is valid, false in other case
106  */
107  bool isValid(SumoXMLAttr key, const std::string& value);
109 
110 private:
113 
116 
119 
121  void setAttribute(SumoXMLAttr key, const std::string& value);
122 
125 
128 
130  std::string getFilename() const;
131 
133  int getFrequency() const;
134 
136  void setFrequency(double freq);
137 
139  void setFilename(std::string filename);
140 };
141 
142 
143 #endif
144 /****************************************************************************/
void setFrequency(double freq)
Invalidated set filename.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Stores the information about how to visualize structures.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
int getFrequency() const
Invalidated set frequency.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
void updateGeometryByParent()
update pre-computed geometry information called by E3 parent
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEDetectorExit(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos)
Constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
~GNEDetectorExit()
destructor
std::string getFilename() const
Invalidated get filename.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
unsigned int GUIGlID
Definition: GUIGlObject.h:50
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void setFilename(std::string filename)
Invalidated.
Position getPositionInView() const
Returns position of detector Exit in view.
static GUIGlID detectorExitGlID
variable to save detectorExit icon
GNEDetectorExit & operator=(const GNEDetectorExit &)
Invalidated assignment operator.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
std::string getAttribute(SumoXMLAttr key) const
GNEDetectorE3 * myE3Parent
pointer to E3 parent
void updateGeometry()
update pre-computed geometry information
GNEDetectorE3 * getE3Parent() const
get E3 Detector parent
static bool detectorExitInitialized
check if detectorExit icon was inicilalizated