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-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 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:
57  GNEDetectorExit(const std::string& id, GNEViewNet* viewNet, GNELane* lane, SUMOReal pos, GNEDetectorE3* parent, bool blocked = false);
58 
61 
64  void updateGeometry();
65 
68 
72  void writeAdditional(OutputDevice& device, const std::string&);
73 
76 
80  void drawGL(const GUIVisualizationSettings& s) const;
82 
85  /* @brief method for getting the Attribute of an XML key
86  * @param[in] key The attribute key
87  * @return string with the value associated to key
88  */
89  std::string getAttribute(SumoXMLAttr key) const;
90 
91  /* @brief method for setting the attribute and letting the object perform additional changes
92  * @param[in] key The attribute key
93  * @param[in] value The new value
94  * @param[in] undoList The undoList on which to register changes
95  */
96  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
97 
98  /* @brief method for checking if the key and their correspond attribute are valids
99  * @param[in] key The attribute key
100  * @param[in] value The value asociated to key key
101  * @return true if the value is valid, false in other case
102  */
103  bool isValid(SumoXMLAttr key, const std::string& value);
105 
106 private:
109 
112 
114  void setAttribute(SumoXMLAttr key, const std::string& value);
115 
118 
121 
123  std::string getFilename() const;
124 
126  int getFrequency() const;
127 
129  void setFrequency(int freq);
130 
132  void setFilename(std::string filename);
133 };
134 
135 
136 #endif
137 /****************************************************************************/
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.
int getFrequency() const
Invalidated set frequency.
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:55
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
static bool detectorE3ExitInitialized
check if detectorExit icon was inicilalizated
void setFrequency(int freq)
Invalidated set filename.
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.
GNEDetectorExit & operator=(const GNEDetectorExit &)
Invalidated assignment operator.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:213
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry()
update pre-computed geometry information
GNEDetectorExit(const std::string &id, GNEViewNet *viewNet, GNELane *lane, SUMOReal pos, GNEDetectorE3 *parent, bool blocked=false)
Constructor.
static GUIGlID detectorE3ExitGlID
variable to save detectorExit icon