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
ROVehicle.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A vehicle as used by router
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef ROVehicle_h
22
#define ROVehicle_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <string>
35
#include <iostream>
36
#include <
utils/common/SUMOTime.h
>
37
#include <
utils/common/SUMOVehicleParameter.h
>
38
#include <
utils/common/SUMOVTypeParameter.h
>
39
#include <
utils/common/UtilExceptions.h
>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
RORouteDef
;
46
class
OutputDevice
;
47
class
ROEdge
;
48
class
RONet
;
49
50
51
// ===========================================================================
52
// class definitions
53
// ===========================================================================
58
class
ROVehicle
{
59
public
:
66
ROVehicle
(
const
SUMOVehicleParameter
& pars,
67
RORouteDef
* route,
const
SUMOVTypeParameter
* type,
68
const
RONet
* net);
69
70
72
virtual
~ROVehicle
();
73
74
81
RORouteDef
*
getRouteDefinition
()
const
{
82
return
myRoute
;
83
}
84
85
92
const
SUMOVTypeParameter
*
getType
()
const
{
93
return
myType
;
94
}
95
96
101
const
std::string&
getID
()
const
{
102
return
myParameter
.
id
;
103
}
104
105
110
SUMOTime
getDepartureTime
()
const
{
111
return
myParameter
.
depart
;
112
}
113
114
const
std::vector<const ROEdge*>&
getStopEdges
()
const
{
115
return
myStopEdges
;
116
}
117
119
SUMOReal
getMaxSpeed
()
const
;
120
121
122
inline
SUMOVehicleClass
getVClass
()
const
{
123
return
getType
() != 0 ?
getType
()->
vehicleClass
:
DEFAULT_VEH_CLASS
;
124
}
125
126
139
void
saveAllAsXML
(
OutputDevice
& os,
OutputDevice
*
const
altos,
140
OutputDevice
*
const
typeos,
bool
withExitTimes)
const
;
141
142
143
private
:
149
void
addStop
(
const
SUMOVehicleParameter::Stop
& stopPar,
const
RONet
* net);
150
151
152
protected
:
154
SUMOVehicleParameter
myParameter
;
155
157
const
SUMOVTypeParameter
*
const
myType
;
158
160
RORouteDef
*
const
myRoute
;
161
163
std::vector<const ROEdge*>
myStopEdges
;
164
165
166
private
:
168
ROVehicle
(
const
ROVehicle
& src);
169
171
ROVehicle
&
operator=
(
const
ROVehicle
& src);
172
173
};
174
175
176
#endif
177
178
/****************************************************************************/
179
home
delphi
sumo
src
router
ROVehicle.h
Generated by
1.8.2