SUMO - Simulation of Urban MObility
GNEDetectorEntry.h
Go to the documentation of this file.
1 /****************************************************************************/
7 //
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 GNEDetectorEntry_h
21 #define GNEDetectorEntry_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 GNEDetectorEntry : public GNEDetector {
48 public:
56  GNEDetectorEntry(GNEViewNet* viewNet, GNEDetectorE3* parent, GNELane* lane, double pos, bool friendlyPos);
57 
60 
65  void writeAdditional(OutputDevice& device, bool volatileOptionsEnabled) const;
66 
68  bool isDetectorPositionFixed() const;
69 
71  GNEDetectorE3* getE3Parent() const;
72 
75 
79  void updateGeometry();
81 
84 
88  void drawGL(const GUIVisualizationSettings& s) const;
90 
93  /* @brief method for getting the Attribute of an XML key
94  * @param[in] key The attribute key
95  * @return string with the value associated to key
96  */
97  std::string getAttribute(SumoXMLAttr key) const;
98 
99  /* @brief method for setting the attribute and letting the object perform additional changes
100  * @param[in] key The attribute key
101  * @param[in] value The new value
102  * @param[in] undoList The undoList on which to register changes
103  */
104  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
105 
106  /* @brief method for checking if the key and their correspond attribute are valids
107  * @param[in] key The attribute key
108  * @param[in] value The value asociated to key key
109  * @return true if the value is valid, false in other case
110  */
111  bool isValid(SumoXMLAttr key, const std::string& value);
113 
114 private:
117 
119  void setAttribute(SumoXMLAttr key, const std::string& value);
120 
122  GNEDetectorEntry(const GNEDetectorEntry&) = delete;
123 
125  GNEDetectorEntry& operator=(const GNEDetectorEntry&) = delete;
126 
128  const std::string& getFilename() const = delete;
129 
131  int getFrequency() const = delete;
132 
134  void setFrequency(double freq) = delete;
135 
137  void setFilename(const std::string& filename) = delete;
138 };
139 
140 #endif
141 
142 /****************************************************************************/
GNEDetectorE3 * myE3Parent
pointer to E3 parent
int getFrequency() const =delete
Invalidated set frequency.
Stores the information about how to visualize structures.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
GNEDetectorEntry(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos, bool friendlyPos)
Constructor.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
~GNEDetectorEntry()
destructor
void updateGeometry()
update pre-computed geometry information
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
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, bool volatileOptionsEnabled) const
writte additional element into a xml file
void setFilename(const std::string &filename)=delete
Invalidated.
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
bool isDetectorPositionFixed() const
check if Position of detector is fixed
void setFrequency(double freq)=delete
Invalidated set filename.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void updateGeometryByParent()
update pre-computed geometry information called by E3 parent
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
const std::string & getFilename() const =delete
Invalidated get filename.
GNEDetectorE3 * getE3Parent() const
get E3 Detector parent
GNEDetectorEntry & operator=(const GNEDetectorEntry &)=delete
Invalidated assignment operator.