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.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 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:
58  GNEDetectorE1(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, double freq, const std::string& filename, bool splitByType);
59 
62 
65  void updateGeometry();
66 
69 
73  void writeAdditional(OutputDevice& device) const;
74 
77 
81  void drawGL(const GUIVisualizationSettings& s) const;
83 
86  /* @brief method for getting the Attribute of an XML key
87  * @param[in] key The attribute key
88  * @return string with the value associated to key
89  */
90  std::string getAttribute(SumoXMLAttr key) const;
91 
92  /* @brief method for setting the attribute and letting the object perform additional changes
93  * @param[in] key The attribute key
94  * @param[in] value The new value
95  * @param[in] undoList The undoList on which to register changes
96  */
97  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
98 
99  /* @brief method for checking if the key and their correspond attribute are valids
100  * @param[in] key The attribute key
101  * @param[in] value The value asociated to key key
102  * @return true if the value is valid, false in other case
103  */
104  bool isValid(SumoXMLAttr key, const std::string& value);
106 
107 protected:
110 
111 private:
113  void setAttribute(SumoXMLAttr key, const std::string& value);
114 
117 
120 };
121 
122 #endif
123 /****************************************************************************/
Position getPositionInView() const
Returns position of detector E1 in view.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
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)
method for setting the attribute and letting the object perform additional changes ...
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
~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.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void updateGeometry()
update pre-computed geometry information
std::string getAttribute(SumoXMLAttr key) const
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
GNEDetectorE1(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double pos, double freq, const std::string &filename, bool splitByType)
Constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.