SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUITriggeredRerouter.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Reroutes vehicles passing an edge (gui-version)
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
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 GUITriggeredRerouter_h
23 #define GUITriggeredRerouter_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 
35 #include <vector>
36 #include <string>
42 #include <gui/GUIManipulator.h>
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
56  : public MSTriggeredRerouter,
58 public:
66  GUITriggeredRerouter(const std::string& id,
67  const std::vector<MSEdge*>& edges, SUMOReal prob,
68  const std::string& aXMLFilename, bool off,
69  SUMORTree& rtree);
70 
71 
74 
75 
77 
78 
87  GUISUMOAbstractView& parent);
88 
89 
98  GUISUMOAbstractView& parent);
99 
100 
107 
108 
113  void drawGL(const GUIVisualizationSettings& s) const;
115 
116 
117 
119  GUISUMOAbstractView& parent);
120 
121 public:
123 
124  public:
125  GUITriggeredRerouterEdge(GUIEdge* edge, GUITriggeredRerouter* parent, bool closed);
126 
127  virtual ~GUITriggeredRerouterEdge();
128 
130 
131 
140  GUISUMOAbstractView& parent);
141 
142 
151  GUISUMOAbstractView& parent);
152 
153 
160 
161 
166  void drawGL(const GUIVisualizationSettings& s) const;
168 
169  private:
171  typedef std::vector<Position> PosCont;
172 
174  typedef std::vector<SUMOReal> RotCont;
175 
176  private:
179 
182 
184  const bool myAmClosedEdge;
185 
188 
191 
194  };
195 
196 public:
199  public:
200 
202  GUISUMOAbstractView& parent, GUIGlObject& o);
203 
205 
207  long onCmdOpenManip(FXObject*, FXSelector, void*);
208 
209  protected:
211 
212  };
213 
214 
216  FXDECLARE(GUIManip_TriggeredRerouter)
217  public:
218  enum {
224  };
227  const std::string& name, GUITriggeredRerouter& o,
228  int xpos, int ypos);
229 
231  virtual ~GUIManip_TriggeredRerouter();
232 
233  long onCmdOverride(FXObject*, FXSelector, void*);
234  long onCmdClose(FXObject*, FXSelector, void*);
235  long onCmdUserDef(FXObject*, FXSelector, void*);
236  long onUpdUserDef(FXObject*, FXSelector, void*);
237  long onCmdChangeOption(FXObject*, FXSelector, void*);
238 
239  private:
241 
243 
244  FXDataTarget myChosenTarget;
245 
247 
248  FXRealSpinDial* myUsageProbabilityDial;
249 
251 
253 
254  protected:
256 
257  };
258 
259 
260 private:
263 
264  std::vector<GUITriggeredRerouterEdge*> myEdgeVisualizations;
265 
266 };
267 
268 
269 #endif
270 
271 /****************************************************************************/
272