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-2014 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
70
public
:
72
~MSDevice_Person
();
73
74
77
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
140
private
:
146
MSDevice_Person
(
SUMOVehicle
& holder,
const
std::string&
id
);
147
148
149
150
private
:
152
std::vector<MSPerson*>
myPersons
;
153
155
bool
myStopped
;
156
157
158
159
private
:
161
MSDevice_Person
(
const
MSDevice_Person
&);
162
164
MSDevice_Person
&
operator=
(
const
MSDevice_Person
&);
165
166
167
};
168
169
170
#endif
171
172
/****************************************************************************/
173
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
devices
MSDevice_Person.h
Generated on Thu Nov 20 2014 19:49:55 for SUMO - Simulation of Urban MObility by
1.8.1.2