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
ODDistrictHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// An XML-Handler for districts
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 ODDistrictHandler_h
23
#define ODDistrictHandler_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 <utility>
37
#include <
utils/xml/SUMOSAXHandler.h
>
38
39
40
// ===========================================================================
41
// class declarations
42
// ===========================================================================
43
class
ODDistrict
;
44
class
ODDistrictCont
;
45
46
47
// ===========================================================================
48
// class definitions
49
// ===========================================================================
57
class
ODDistrictHandler
:
public
SUMOSAXHandler
{
58
public
:
65
ODDistrictHandler
(
ODDistrictCont
& cont,
const
std::string& file) ;
66
67
69
~ODDistrictHandler
() ;
70
71
72
protected
:
74
75
86
void
myStartElement
(
int
element,
87
const
SUMOSAXAttributes
& attrs) ;
88
89
97
void
myEndElement
(
int
element) ;
99
100
101
private
:
110
void
openDistrict
(
const
SUMOSAXAttributes
& attrs) ;
111
112
124
void
addSource
(
const
SUMOSAXAttributes
& attrs) ;
125
126
138
void
addSink
(
const
SUMOSAXAttributes
& attrs) ;
139
140
145
void
closeDistrict
() ;
146
147
163
std::pair<std::string, SUMOReal>
parseConnection
(
const
SUMOSAXAttributes
& attrs) ;
164
165
private
:
167
ODDistrictCont
&
myContainer
;
168
170
ODDistrict
*
myCurrentDistrict
;
171
172
bool
myHaveWarnedAboutDeprecatedDistrict
,
myHaveWarnedAboutDeprecatedDSource
,
myHaveWarnedAboutDeprecatedDSink
;
173
174
175
private
:
177
ODDistrictHandler
(
const
ODDistrictHandler
& s);
178
180
ODDistrictHandler
&
operator=
(
const
ODDistrictHandler
& s);
181
182
183
};
184
185
186
#endif
187
188
/****************************************************************************/
189
build
buildd
sumo-0.15.0~dfsg
src
od2trips
ODDistrictHandler.h
Generated on Wed Jul 18 2012 22:58:35 for SUMO - Simulation of Urban MObility by
1.8.1.1