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
SUMORouteHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Parser for routes during their loading
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 SUMORouteHandler_h
23
#define SUMORouteHandler_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 <
utils/common/IDSupplier.h
>
36
#include <
utils/common/SUMOTime.h
>
37
#include <
utils/common/SUMOVehicleParameter.h
>
38
#include <
utils/xml/SUMOSAXHandler.h
>
39
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
SUMOVTypeParameter
;
45
46
47
// ===========================================================================
48
// class definitions
49
// ===========================================================================
57
class
SUMORouteHandler
:
public
SUMOSAXHandler
{
58
public
:
60
SUMORouteHandler
(
const
std::string& file);
61
63
virtual
~SUMORouteHandler
();
64
66
SUMOTime
getLastDepart
()
const
;
67
69
bool
checkStopPos
(
SUMOReal
& startPos,
SUMOReal
& endPos,
const
SUMOReal
laneLength,
70
const
SUMOReal
minLength,
const
bool
friendlyPos);
71
72
protected
:
74
75
83
virtual
void
myStartElement
(
int
element,
84
const
SUMOSAXAttributes
& attrs);
85
86
93
virtual
void
myEndElement
(
int
element);
95
96
98
virtual
void
openVehicleTypeDistribution
(
const
SUMOSAXAttributes
& attrs) = 0;
99
101
virtual
void
closeVehicleTypeDistribution
() = 0;
102
104
virtual
void
openRoute
(
const
SUMOSAXAttributes
& attrs) = 0;
105
111
virtual
void
closeRoute
(
const
bool
mayBeDisconnected =
false
) = 0;
112
114
virtual
void
openRouteDistribution
(
const
SUMOSAXAttributes
& attrs) = 0;
115
117
virtual
void
closeRouteDistribution
() = 0;
118
120
virtual
void
closeVehicle
() = 0;
121
123
virtual
void
closePerson
() = 0;
124
126
virtual
void
closeFlow
() = 0;
127
129
virtual
void
addStop
(
const
SUMOSAXAttributes
& attrs) = 0;
130
132
bool
checkLastDepart
();
133
135
void
registerLastDepart
();
136
138
void
addParam
(
const
SUMOSAXAttributes
& attrs);
139
140
protected
:
142
SUMOVehicleParameter
*
myVehicleParameter
;
143
145
SUMOTime
myLastDepart
;
146
148
std::string
myActiveRouteID
;
149
151
std::string
myActiveRouteRefID
;
152
154
SUMOReal
myActiveRouteProbability
;
155
157
const
RGBColor
*
myActiveRouteColor
;
158
160
std::vector<SUMOVehicleParameter::Stop>
myActiveRouteStops
;
161
163
SUMOVTypeParameter
*
myCurrentVType
;
164
166
IDSupplier
myIdSupplier
;
167
169
SUMOTime
myBeginDefault
;
170
172
SUMOTime
myEndDefault
;
173
174
private
:
176
SUMORouteHandler
(
const
SUMORouteHandler
& s);
177
179
SUMORouteHandler
&
operator=
(
const
SUMORouteHandler
& s);
180
181
};
182
183
184
#endif
185
186
/****************************************************************************/
build
buildd
sumo-0.18~dfsg
src
utils
xml
SUMORouteHandler.h
Generated on Wed Oct 23 2013 01:15:12 for SUMO - Simulation of Urban MObility by
1.8.4