SUMO - Simulation of Urban MObility
GUI_E2_ZS_CollectorOverLanes.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // The gui-version of a MS_E2_ZS_CollectorOverLanes.
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUI_E2_ZS_CollectorOverLanes_h
23 #define GUI_E2_ZS_CollectorOverLanes_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
36 #include "GUIDetectorWrapper.h"
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
58 public:
59  typedef std::vector<GUI_E2_ZS_Collector*> CollectorVector;
60 
62  GUI_E2_ZS_CollectorOverLanes(std::string id, DetectorUsage usage,
63  MSLane* lane, SUMOReal startPos,
64  SUMOTime haltingTimeThreshold,
65  SUMOReal haltingSpeedThreshold,
66  SUMOReal jamDistThreshold, const std::string& vTypes);
67 
70 
71  // invalid in fact, as collectors do not need a lane
73 
74 
75 protected:
76  MSE2Collector* buildCollector(int c, int r,
77  MSLane* l, SUMOReal start, SUMOReal end,
78  const std::set<std::string>& vTypes);
79 
80 
81 public:
86  class MyWrapper : public GUIDetectorWrapper {
87  public:
90  const LaneDetMap& detectors);
91 
93  ~MyWrapper();
94 
95 
97 
98 
107  GUIMainWindow& app, GUISUMOAbstractView& parent);
108 
109 
116 
117 
122  void drawGL(const GUIVisualizationSettings& s) const;
124 
125 
128 
129  protected:
131  /*
132  void myMkExistingItem(GUIParameterTableWindow &ret,
133  const std::string &name, E2::DetType type);
134  */
135 
136  private:
139 
142 
143  std::vector<GUIDetectorWrapper*> mySubWrappers;
144 
150  /*
151  class MyValueRetriever : public ValueSource<SUMOReal>
152  {
153  public:
155  MyValueRetriever(GUI_E2_ZS_CollectorOverLanes &det,
156  E2::DetType type, MSUnit::Seconds nSec)
157  : myDetector(det), myType(type), myNSec(nSec) { }
158 
160  ~MyValueRetriever() { }
161 
163  SUMOReal getValue() const {
164  return myDetector.getAggregate(myType, myNSec);
165  }
166 
168  ValueSource<SUMOReal> *copy() const {
169  return new MyValueRetriever(myDetector, myType, myNSec);
170  }
171 
172  private:
174  GUI_E2_ZS_CollectorOverLanes &myDetector;
175 
177  E2::DetType myType;
178 
180  MSUnit::Seconds myNSec;
181  };
182  */
183  private:
185  MyWrapper(const MyWrapper&);
186 
188  MyWrapper& operator=(const MyWrapper&);
189 
190  };
191 
192 };
193 
194 
195 #endif
196 
197 /****************************************************************************/
198 
GUI_E2_ZS_CollectorOverLanes & myDetector
Builds a view within the parameter table if the according type is available.
long long int SUMOTime
Definition: SUMOTime.h:43
The gui-version of a MS_E2_ZS_CollectorOverLanes.
An areal (along a single lane) detector.
Definition: MSE2Collector.h:83
A detector which joins E2Collectors over consecutive lanes (backward)
Stores the information about how to visualize structures.
GUI_E2_ZS_CollectorOverLanes & getLoop()
Returns the detector itself.
MyWrapper & operator=(const MyWrapper &)
Invalidated assignment operator.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Boundary myBoundary
The detector&#39;s boundary.
std::vector< GUIDetectorWrapper * > mySubWrappers
std::vector< GUI_E2_ZS_Collector * > CollectorVector
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Builds the graphical representation.
std::map< MSLane *, MSE2Collector * > LaneDetMap
Definition of a map from a lane to the detector lying on it.
MyWrapper(GUI_E2_ZS_CollectorOverLanes &detector, const LaneDetMap &detectors)
Constructor.
MSE2Collector * buildCollector(int c, int r, MSLane *l, SUMOReal start, SUMOReal end, const std::set< std::string > &vTypes)
Builds a single collector.
The gui-version of the MS_E2_ZS_Collector.
GUI_E2_ZS_CollectorOverLanes(std::string id, DetectorUsage usage, MSLane *lane, SUMOReal startPos, SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold, SUMOReal jamDistThreshold, const std::string &vTypes)
Constructor.
#define SUMOReal
Definition: config.h:213
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
A window containing a gl-object&#39;s parameter.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.