SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
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>
37
#include <
foreign/rtree/SUMORTree.h
>
38
#include <
microsim/trigger/MSTriggeredRerouter.h
>
39
#include <
utils/foxtools/FXRealSpinDial.h
>
40
#include <
utils/gui/globjects/GUIGlObject_AbstractAdd.h
>
41
#include <
utils/gui/globjects/GUIGLObjectPopupMenu.h
>
42
#include <
gui/GUIManipulator.h
>
43
44
45
// ===========================================================================
46
// class definitions
47
// ===========================================================================
55
class
GUITriggeredRerouter
56
:
public
MSTriggeredRerouter
,
57
public
GUIGlObject_AbstractAdd
{
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
73
~GUITriggeredRerouter
();
74
75
77
78
86
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
87
GUISUMOAbstractView
& parent);
88
89
97
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
98
GUISUMOAbstractView
& parent);
99
100
106
Boundary
getCenteringBoundary
()
const
;
107
108
113
void
drawGL
(
const
GUIVisualizationSettings
& s)
const
;
115
116
117
118
GUIManipulator
*
openManipulator
(
GUIMainWindow
& app,
119
GUISUMOAbstractView
& parent);
120
121
public
:
122
class
GUITriggeredRerouterEdge
:
public
GUIGlObject
{
123
124
public
:
125
GUITriggeredRerouterEdge
(
GUIEdge
* edge,
GUITriggeredRerouter
* parent,
bool
closed);
126
127
virtual
~GUITriggeredRerouterEdge
();
128
130
131
139
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
140
GUISUMOAbstractView
& parent);
141
142
150
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
151
GUISUMOAbstractView
& parent);
152
153
159
Boundary
getCenteringBoundary
()
const
;
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
:
178
GUITriggeredRerouter
*
myParent
;
179
181
MSEdge
*
myEdge
;
182
184
const
bool
myAmClosedEdge
;
185
187
PosCont
myFGPositions
;
188
190
RotCont
myFGRotations
;
191
193
Boundary
myBoundary
;
194
};
195
196
public
:
197
class
GUITriggeredRerouterPopupMenu
:
public
GUIGLObjectPopupMenu
{
198
FXDECLARE(
GUITriggeredRerouterPopupMenu
)
199
public
:
200
201
GUITriggeredRerouterPopupMenu
(
GUIMainWindow
& app,
202
GUISUMOAbstractView
& parent,
GUIGlObject
& o);
203
204
~GUITriggeredRerouterPopupMenu
();
205
207
long
onCmdOpenManip
(
FXObject
*, FXSelector,
void
*);
208
209
protected
:
210
GUITriggeredRerouterPopupMenu
() { }
211
212
};
213
214
215
class
GUIManip_TriggeredRerouter
:
public
GUIManipulator
{
216
FXDECLARE(
GUIManip_TriggeredRerouter
)
217
public
:
218
enum
{
219
MID_USER_DEF
= FXDialogBox::ID_LAST,
220
MID_PRE_DEF
,
221
MID_OPTION
,
222
MID_CLOSE
,
223
ID_LAST
224
};
226
GUIManip_TriggeredRerouter
(
GUIMainWindow
& app,
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
:
240
GUIMainWindow
*
myParent
;
241
242
FXint
myChosenValue
;
243
244
FXDataTarget
myChosenTarget
;
245
246
SUMOReal
myUsageProbability
;
247
248
FXRealSpinDial*
myUsageProbabilityDial
;
249
250
FXDataTarget
myUsageProbabilityTarget
;
251
252
GUITriggeredRerouter
*
myObject
;
253
254
protected
:
255
GUIManip_TriggeredRerouter
() { }
256
257
};
258
259
260
private
:
262
Boundary
myBoundary
;
263
264
std::vector<GUITriggeredRerouterEdge*>
myEdgeVisualizations
;
265
266
};
267
268
269
#endif
270
271
/****************************************************************************/
272
build
buildd
sumo-0.17.1~dfsg
src
guisim
GUITriggeredRerouter.h
Generated on Sun Jun 16 2013 17:30:15 for SUMO - Simulation of Urban MObility by
1.8.3.1