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
MSRouteHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Parser and container 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 MSRouteHandler_h
23
#define MSRouteHandler_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 "
MSPerson.h
"
37
#include "
MSVehicle.h
"
38
#include <
utils/xml/SUMORouteHandler.h
>
39
#include <
utils/common/SUMOTime.h
>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
MSEdge
;
46
class
MSVehicleType
;
47
48
49
// ===========================================================================
50
// class definitions
51
// ===========================================================================
60
class
MSRouteHandler
:
public
SUMORouteHandler
{
61
public
:
63
MSRouteHandler
(
const
std::string& file,
64
bool
addVehiclesDirectly);
65
67
virtual
~MSRouteHandler
();
68
69
protected
:
71
72
80
virtual
void
myStartElement
(
int
element,
81
const
SUMOSAXAttributes
& attrs);
82
83
90
virtual
void
myEndElement
(
int
element);
92
93
95
void
openVehicleTypeDistribution
(
const
SUMOSAXAttributes
& attrs);
96
98
void
closeVehicleTypeDistribution
();
99
101
void
openRoute
(
const
SUMOSAXAttributes
& attrs);
102
108
void
closeRoute
();
109
111
void
openRouteDistribution
(
const
SUMOSAXAttributes
& attrs);
112
114
void
closeRouteDistribution
();
115
117
void
closeVehicle
();
118
120
void
closePerson
();
121
123
void
closeFlow
();
124
126
void
addStop
(
const
SUMOSAXAttributes
& attrs);
127
128
protected
:
130
MSEdgeVector
myActiveRoute
;
131
133
MSPerson::MSPersonPlan
*
myActivePlan
;
134
136
bool
myAddVehiclesDirectly
;
137
139
RandomDistributor<MSVehicleType*>
*
myCurrentVTypeDistribution
;
140
142
std::string
myCurrentVTypeDistributionID
;
143
145
RandomDistributor<const MSRoute*>
*
myCurrentRouteDistribution
;
146
148
std::string
myCurrentRouteDistributionID
;
149
150
private
:
152
MSRouteHandler
(
const
MSRouteHandler
& s);
153
155
MSRouteHandler
&
operator=
(
const
MSRouteHandler
& s);
156
157
};
158
159
160
#endif
161
162
/****************************************************************************/
163
build
buildd
sumo-0.16.0~dfsg
src
microsim
MSRouteHandler.h
Generated on Tue Apr 16 2013 01:32:18 for SUMO - Simulation of Urban MObility by
1.8.3.1