SUMO - Simulation of Urban MObility
GNEDetectorExit.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 GNEDetectorExit_h
20 #define GNEDetectorExit_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 // class declarations
36 // ===========================================================================
37 class GNEDetectorE3;
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
46 class GNEDetectorExit : public GNEDetector {
47 
48 public:
56  GNEDetectorExit(GNEViewNet* viewNet, GNEDetectorE3* parent, GNELane* lane, double pos, bool friendlyPos);
57 
60 
64  void writeAdditional(OutputDevice& device) const;
65 
67  bool isDetectorPositionFixed() const;
68 
72  void updateGeometry();
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 private:
109  void setAttribute(SumoXMLAttr key, const std::string& value);
110 
113 
115  GNEDetectorExit& operator=(const GNEDetectorExit&) = delete;
116 };
117 
118 
119 #endif
120 /****************************************************************************/
GNEDetectorExit & operator=(const GNEDetectorExit &)=delete
Invalidated assignment operator.
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.
void writeAdditional(OutputDevice &device) const
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:53
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEDetectorExit(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos, bool friendlyPos)
Constructor.
~GNEDetectorExit()
destructor
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
bool isDetectorPositionFixed() const
check if Position of detector is fixed
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
void updateGeometry()
update pre-computed geometry information