SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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-sim.org/
12 // Copyright (C) 2001-2013 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 <microsim/MSNet.h>
37 #include <utils/geom/Position.h>
41 #include "GUI_E2_ZS_Collector.h"
42 #include "GUIDetectorWrapper.h"
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);
67 
70 
71  // invalid in fact, as collectors do not need a lane
73 
74 
75 protected:
76  MSE2Collector* buildCollector(size_t c, size_t r,
77  MSLane* l, SUMOReal start, SUMOReal end);
78 
79 
80 public:
85  class MyWrapper : public GUIDetectorWrapper {
86  public:
89  const LaneDetMap& detectors);
90 
92  ~MyWrapper();
93 
94 
96 
97 
106  GUIMainWindow& app, GUISUMOAbstractView& parent);
107 
108 
115 
116 
121  void drawGL(const GUIVisualizationSettings& s) const;
123 
124 
127 
128  protected:
130  /*
131  void myMkExistingItem(GUIParameterTableWindow &ret,
132  const std::string &name, E2::DetType type);
133  */
134 
135  private:
138 
141 
142  std::vector<GUIDetectorWrapper*> mySubWrappers;
143 
149  /*
150  class MyValueRetriever : public ValueSource<SUMOReal>
151  {
152  public:
154  MyValueRetriever(GUI_E2_ZS_CollectorOverLanes &det,
155  E2::DetType type, MSUnit::Seconds nSec)
156  : myDetector(det), myType(type), myNSec(nSec) { }
157 
159  ~MyValueRetriever() { }
160 
162  SUMOReal getValue() const {
163  return myDetector.getAggregate(myType, myNSec);
164  }
165 
167  ValueSource<SUMOReal> *copy() const {
168  return new MyValueRetriever(myDetector, myType, myNSec);
169  }
170 
171  private:
173  GUI_E2_ZS_CollectorOverLanes &myDetector;
174 
176  E2::DetType myType;
177 
179  MSUnit::Seconds myNSec;
180  };
181  */
182  private:
184  MyWrapper(const MyWrapper&);
185 
187  MyWrapper& operator=(const MyWrapper&);
188 
189  };
190 
191 };
192 
193 
194 #endif
195 
196 /****************************************************************************/
197