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
MSMoveReminder.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Something on a lane to be noticed about vehicle movement
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef MSMoveReminder_h
24
#define MSMoveReminder_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <map>
37
#include <
utils/common/SUMOTime.h
>
38
#include <
utils/common/StdDefs.h
>
39
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
SUMOVehicle
;
45
class
MSLane
;
46
47
48
// ===========================================================================
49
// class definitions
50
// ===========================================================================
68
class
MSMoveReminder
{
69
public
:
75
MSMoveReminder
(
MSLane
*
const
lane = 0,
const
bool
doAdd =
true
);
76
77
80
virtual
~MSMoveReminder
() {}
81
82
87
const
MSLane
*
getLane
()
const
{
88
return
myLane
;
89
}
90
91
93
enum
Notification
{
95
NOTIFICATION_DEPARTED
,
97
NOTIFICATION_JUNCTION
,
99
NOTIFICATION_SEGMENT
,
101
NOTIFICATION_LANE_CHANGE
,
103
NOTIFICATION_TELEPORT
,
105
NOTIFICATION_PARKING
,
107
NOTIFICATION_ARRIVED
,
// arrived and everything after is treated as permanent deletion from the net
109
NOTIFICATION_VAPORIZED
,
111
NOTIFICATION_TELEPORT_ARRIVED
112
};
113
114
117
128
virtual
bool
notifyEnter
(
SUMOVehicle
& veh,
Notification
reason) {
129
UNUSED_PARAMETER
(reason);
130
UNUSED_PARAMETER
(&veh);
131
return
true
;
132
}
133
134
148
virtual
bool
notifyMove
(
SUMOVehicle
& veh,
149
SUMOReal
oldPos,
150
SUMOReal
newPos,
151
SUMOReal
newSpeed) {
152
UNUSED_PARAMETER
(oldPos);
153
UNUSED_PARAMETER
(newPos);
154
UNUSED_PARAMETER
(newSpeed);
155
UNUSED_PARAMETER
(&veh);
156
return
true
;
157
}
158
159
173
virtual
bool
notifyLeave
(
SUMOVehicle
& veh,
SUMOReal
lastPos,
174
Notification
reason) {
175
UNUSED_PARAMETER
(reason);
176
UNUSED_PARAMETER
(lastPos);
177
UNUSED_PARAMETER
(&veh);
178
return
true
;
179
}
180
181
182
#ifdef HAVE_INTERNAL
183
void
updateDetector(
SUMOVehicle
& veh,
SUMOReal
entryPos,
SUMOReal
leavePos,
184
SUMOTime
entryTime,
SUMOTime
currentTime,
SUMOTime
leaveTime);
185
#endif
186
188
189
200
virtual
void
notifyMoveInternal
(
SUMOVehicle
& veh,
201
SUMOReal
timeOnLane,
202
SUMOReal
speed) {
203
UNUSED_PARAMETER
(speed);
204
UNUSED_PARAMETER
(timeOnLane);
205
UNUSED_PARAMETER
(&veh);
206
}
207
208
209
private
:
210
MSMoveReminder
&
operator=
(
const
MSMoveReminder
&);
// just to avoid a compiler warning
211
212
213
protected
:
215
MSLane
*
const
myLane
;
216
217
218
#ifdef HAVE_INTERNAL
219
std::map<SUMOVehicle*, std::pair<SUMOTime, SUMOReal> > myLastVehicleUpdateValues;
220
#endif
221
222
};
223
224
225
#endif
226
227
/****************************************************************************/
228
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
microsim
MSMoveReminder.h
Generated on Sun Jun 16 2013 07:07:38 for SUMO - Simulation of Urban MObility by
1.8.1.2