SUMO - Simulation of Urban MObility
GNEDetectorE1.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 GNEDetectorE1_h
21 #define GNEDetectorE1_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 GNEDetector;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 class GNEDetectorE1 : public GNEDetector {
48 public:
59  GNEDetectorE1(const std::string& id, GNELane* lane, GNEViewNet* viewNet, SUMOReal pos, SUMOReal freq, const std::string& filename, bool splitByType, bool blocked);
60 
63 
66  void updateGeometry();
67 
70 
74  void writeAdditional(OutputDevice& device, const std::string&);
75 
78 
82  void drawGL(const GUIVisualizationSettings& s) const;
84 
87  /* @brief method for getting the Attribute of an XML key
88  * @param[in] key The attribute key
89  * @return string with the value associated to key
90  */
91  std::string getAttribute(SumoXMLAttr key) const;
92 
93  /* @brief method for setting the attribute and letting the object perform additional changes
94  * @param[in] key The attribute key
95  * @param[in] value The new value
96  * @param[in] undoList The undoList on which to register changes
97  */
98  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
99 
100  /* @brief method for checking if the key and their correspond attribute are valids
101  * @param[in] key The attribute key
102  * @param[in] value The value asociated to key key
103  * @return true if the value is valid, false in other case
104  */
105  bool isValid(SumoXMLAttr key, const std::string& value);
107 
108 protected:
111 
112 private:
114  void setAttribute(SumoXMLAttr key, const std::string& value);
115 
118 
121 };
122 
123 #endif
124 /****************************************************************************/
bool isValid(SumoXMLAttr key, const std::string &value)
bool mySplitByType
attribute to enable or disable splitByType
Stores the information about how to visualize structures.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
~GNEDetectorE1()
Destructor.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEDetectorE1 & operator=(const GNEDetectorE1 &)
Invalidated assignment operator.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position getPositionInView() const
Returns position of detector E1 in view.
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry()
update pre-computed geometry information
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:213
GNEDetectorE1(const std::string &id, GNELane *lane, GNEViewNet *viewNet, SUMOReal pos, SUMOReal freq, const std::string &filename, bool splitByType, bool blocked)
Constructor.