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.sourceforge.net/
12
// Copyright (C) 2001-2012 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 <string>
36
#include <
utils/xml/SUMOSAXHandler.h
>
37
#include <
utils/common/SUMOTime.h
>
38
39
40
// ===========================================================================
41
// class definitions
42
// ===========================================================================
50
class
SUMORouteHandler
:
public
SUMOSAXHandler
{
51
public
:
53
SUMORouteHandler
(
const
std::string& file);
54
56
virtual
~SUMORouteHandler
();
57
59
SUMOTime
getLastDepart
()
const
;
60
62
bool
checkStopPos
(
SUMOReal
& startPos,
SUMOReal
& endPos,
const
SUMOReal
laneLength,
63
const
SUMOReal
minLength,
const
bool
friendlyPos);
64
65
protected
:
67
68
76
virtual
void
myStartElement
(
int
element,
77
const
SUMOSAXAttributes
& attrs);
78
79
86
virtual
void
myEndElement
(
int
element);
88
89
91
virtual
void
openVehicleTypeDistribution
(
const
SUMOSAXAttributes
& attrs) = 0;
92
94
virtual
void
closeVehicleTypeDistribution
() = 0;
95
97
virtual
void
openRoute
(
const
SUMOSAXAttributes
& attrs) = 0;
98
104
virtual
void
closeRoute
() = 0;
105
107
virtual
void
openRouteDistribution
(
const
SUMOSAXAttributes
& attrs) = 0;
108
110
virtual
void
closeRouteDistribution
() = 0;
111
113
virtual
void
closeVehicle
() = 0;
114
116
virtual
void
closePerson
() = 0;
117
119
virtual
void
closeFlow
() = 0;
120
122
virtual
void
addStop
(
const
SUMOSAXAttributes
& attrs) = 0;
123
125
bool
checkLastDepart
();
126
128
void
registerLastDepart
();
129
130
protected
:
132
SUMOVehicleParameter
*
myVehicleParameter
;
133
135
SUMOTime
myLastDepart
;
136
138
std::string
myActiveRouteID
;
139
141
std::string
myActiveRouteRefID
;
142
144
SUMOReal
myActiveRouteProbability
;
145
147
const
RGBColor
*
myActiveRouteColor
;
148
150
std::vector<SUMOVehicleParameter::Stop>
myActiveRouteStops
;
151
153
SUMOVTypeParameter
*
myCurrentVType
;
154
155
private
:
157
SUMORouteHandler
(
const
SUMORouteHandler
& s);
158
160
SUMORouteHandler
&
operator=
(
const
SUMORouteHandler
& s);
161
162
};
163
164
165
#endif
166
167
/****************************************************************************/
build
buildd
sumo-0.16.0~dfsg
src
utils
xml
SUMORouteHandler.h
Generated on Tue Apr 16 2013 01:32:21 for SUMO - Simulation of Urban MObility by
1.8.3.1