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
MSDevice_Person.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// A device which is used to keep track of Persons riding with a vehicle
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 MSDevice_Person_h
23
#define MSDevice_Person_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 <set>
36
#include <vector>
37
#include <map>
38
#include "
MSDevice.h
"
39
#include <
utils/common/SUMOTime.h
>
40
#include <
microsim/MSVehicle.h
>
41
#include <
utils/common/WrappingCommand.h
>
42
43
44
// ===========================================================================
45
// class declarations
46
// ===========================================================================
47
class
MSLane
;
48
49
50
// ===========================================================================
51
// class definitions
52
// ===========================================================================
57
class
MSDevice_Person
:
public
MSDevice
{
58
public
:
66
static
MSDevice_Person
*
buildVehicleDevices
(
SUMOVehicle
& v, std::vector<MSDevice*>& into);
67
68
69
public
:
71
~MSDevice_Person
();
72
73
76
87
bool
notifyMove
(
SUMOVehicle
& veh,
SUMOReal
oldPos,
SUMOReal
newPos,
SUMOReal
newSpeed);
88
89
98
bool
notifyEnter
(
SUMOVehicle
& veh,
MSMoveReminder::Notification
reason);
99
100
110
bool
notifyLeave
(
SUMOVehicle
& veh,
SUMOReal
lastPos,
111
MSMoveReminder::Notification
reason);
113
114
115
120
void
addPerson
(
MSPerson
* person);
121
122
126
unsigned
int
size
()
const
{
127
return
static_cast<
unsigned
int
>
(
myPersons
.size());
128
}
129
130
134
const
std::vector<MSPerson*>&
getPersons
()
const
{
135
return
myPersons
;
136
}
137
138
139
private
:
145
MSDevice_Person
(
SUMOVehicle
& holder,
const
std::string&
id
);
146
147
148
149
private
:
151
std::vector<MSPerson*>
myPersons
;
152
154
bool
myStopped
;
155
156
157
158
private
:
160
MSDevice_Person
(
const
MSDevice_Person
&);
161
163
MSDevice_Person
&
operator=
(
const
MSDevice_Person
&);
164
165
166
};
167
168
169
#endif
170
171
/****************************************************************************/
172
build
buildd
sumo-0.18~dfsg
src
microsim
devices
MSDevice_Person.h
Generated on Wed Oct 23 2013 01:15:09 for SUMO - Simulation of Urban MObility by
1.8.4