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
SUMOVehicleParserHelper.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Helper methods for parsing vehicle attributes
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef SUMOVehicleParserHelper_h
24
#define SUMOVehicleParserHelper_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <string>
37
#include <
utils/xml/SUMOSAXHandler.h
>
38
#include <
utils/xml/SUMOXMLDefinitions.h
>
39
#include <
utils/common/SUMOTime.h
>
40
#include <
utils/common/SUMOVehicleClass.h
>
41
#include <
utils/common/SUMOVehicleParameter.h
>
42
#include <
utils/common/SUMOVTypeParameter.h
>
43
#include <
utils/common/UtilExceptions.h
>
44
#include <
utils/common/StdDefs.h
>
45
46
// ===========================================================================
47
// class definitions
48
// ===========================================================================
55
class
SUMOVehicleParserHelper
{
56
public
:
67
static
SUMOVehicleParameter
*
parseFlowAttributes
(
const
SUMOSAXAttributes
& attrs) ;
68
69
82
static
SUMOVehicleParameter
*
parseVehicleAttributes
(
const
SUMOSAXAttributes
& attrs,
83
bool
skipID =
false
,
bool
skipDepart =
false
) ;
84
85
93
static
SUMOVTypeParameter
*
beginVTypeParsing
(
const
SUMOSAXAttributes
& attrs) ;
94
95
105
static
void
parseVTypeEmbedded
(
SUMOVTypeParameter
& into,
106
int
element,
const
SUMOSAXAttributes
& attrs,
107
bool
fromVType =
false
) ;
108
109
114
static
void
closeVTypeParsing
(
SUMOVTypeParameter
& vtype) {
115
UNUSED_PARAMETER
(vtype);
116
}
117
118
133
static
SUMOVehicleClass
parseVehicleClass
(
const
SUMOSAXAttributes
& attrs,
const
std::string&
id
);
134
135
150
static
SUMOEmissionClass
parseEmissionClass
(
const
SUMOSAXAttributes
& attrs,
const
std::string&
id
);
151
152
167
static
SUMOVehicleShape
parseGuiShape
(
const
SUMOSAXAttributes
& attrs,
const
std::string&
id
);
168
169
170
private
:
181
static
void
parseCommonAttributes
(
const
SUMOSAXAttributes
& attrs,
182
SUMOVehicleParameter
* ret, std::string element) ;
183
184
185
typedef
std::map<SumoXMLTag, std::set<SumoXMLAttr> >
CFAttrMap
;
186
187
// returns allowed attrs for each known CF-model (init on first use)
188
static
const
CFAttrMap
&
getAllowedCFModelAttrs
();
189
190
// brief allowed attrs for each known CF-model
191
static
CFAttrMap
allowedCFModelAttrs
;
192
193
194
static
bool
gHaveWarnedAboutDeprecatedNumber
,
gHaveWarnedAboutDeprecatedTazs
,
195
gHaveWarnedAboutDeprecatedDepartLane
,
gHaveWarnedAboutDeprecatedDepartPos
,
gHaveWarnedAboutDeprecatedDepartSpeed
,
196
gHaveWarnedAboutDeprecatedArrivalLane
,
gHaveWarnedAboutDeprecatedArrivalPos
,
gHaveWarnedAboutDeprecatedArrivalSpeed
,
197
gHaveWarnedAboutDeprecatedMaxSpeed
,
gHaveWarnedAboutDeprecatedVClass
;
198
};
199
200
201
#endif
202
203
/****************************************************************************/
204
tmp
buildd
sumo-0.15.0~dfsg
src
utils
xml
SUMOVehicleParserHelper.h
Generated on Sun May 27 2012 14:52:11 for SUMO - Simulation of Urban MObility by
1.8.1