SUMO - Simulation of Urban MObility
GNEDetectorE1.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 GNEDetectorE1_h
20 #define GNEDetectorE1_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 "GNEDetector.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 class GNEDetectorE1 : public GNEDetector {
43 
44 public:
55  GNEDetectorE1(const std::string& id, GNELane* lane, GNEViewNet* viewNet, double pos, double freq, const std::string& filename, const std::string& vehicleTypes, bool friendlyPos);
56 
59 
63  void writeAdditional(OutputDevice& device) const;
64 
66  bool isDetectorPositionFixed() const;
67 
71  void updateGeometry();
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 protected:
108  std::string myVehicleTypes;
109 
110 private:
112  void setAttribute(SumoXMLAttr key, const std::string& value);
113 
115  GNEDetectorE1(const GNEDetectorE1&) = delete;
116 
118  GNEDetectorE1& operator=(const GNEDetectorE1&) = delete;
119 };
120 
121 #endif
122 /****************************************************************************/
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
GNEDetectorE1 & operator=(const GNEDetectorE1 &)=delete
Invalidated assignment operator.
Stores the information about how to visualize structures.
GNEDetectorE1(const std::string &id, GNELane *lane, GNEViewNet *viewNet, double pos, double freq, const std::string &filename, const std::string &vehicleTypes, bool friendlyPos)
Constructor.
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.
std::string myVehicleTypes
attribute vehicle types
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:53
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void updateGeometry()
update pre-computed geometry information
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
bool isDetectorPositionFixed() const
check if Position of detector is fixed
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.