SUMOVehicleParserHelper.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef SUMOVehicleParserHelper_h
00020 #define SUMOVehicleParserHelper_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <string>
00033 #include <utils/xml/SUMOSAXHandler.h>
00034 #include <utils/xml/SUMOXMLDefinitions.h>
00035 #include <utils/common/SUMOTime.h>
00036 #include <utils/common/SUMOVehicleClass.h>
00037 #include <utils/common/SUMOVehicleParameter.h>
00038 #include <utils/common/SUMOVTypeParameter.h>
00039 #include <utils/common/UtilExceptions.h>
00040
00041
00042
00043
00044
00051 class SUMOVehicleParserHelper {
00052 public:
00062 static SUMOVehicleParameter *parseFlowAttributes(const SUMOSAXAttributes &attrs) throw(ProcessError);
00063
00064
00076 static SUMOVehicleParameter *parseVehicleAttributes(const SUMOSAXAttributes &attrs,
00077 bool skipID=false, bool skipDepart=false) throw(ProcessError);
00078
00079
00086 static SUMOVTypeParameter *beginVTypeParsing(const SUMOSAXAttributes &attrs) throw(ProcessError);
00087
00088
00098 static void parseVTypeEmbedded(SUMOVTypeParameter &into,
00099 int element, const SUMOSAXAttributes &attrs,
00100 bool fromVType=false) throw(ProcessError);
00101
00102
00111 static void parseVTypeEmbedded_Krauss(SUMOVTypeParameter &into,
00112 const SUMOSAXAttributes &attrs,
00113 bool fromVType=false) throw(ProcessError);
00114
00115
00123 static void parseVTypeEmbedded_IDM(SUMOVTypeParameter &into,
00124 const SUMOSAXAttributes &attrs) throw(ProcessError);
00125
00126
00134 static void parseVTypeEmbedded_BKerner(SUMOVTypeParameter &into,
00135 const SUMOSAXAttributes &attrs) throw(ProcessError);
00136
00137
00142 static void closeVTypeParsing(SUMOVTypeParameter &vtype) throw() { }
00143
00144
00160 static SUMOVehicleClass parseVehicleClass(const SUMOSAXAttributes &attrs, const std::string &type,
00161 const std::string &id) throw();
00162
00163
00179 static SUMOEmissionClass parseEmissionClass(const SUMOSAXAttributes &attrs, const std::string &type,
00180 const std::string &id) throw();
00181
00182
00198 static SUMOVehicleShape parseGuiShape(const SUMOSAXAttributes &attrs, const std::string &type,
00199 const std::string &id) throw();
00200
00201
00202 private:
00213 static void parseCommonAttributes(const SUMOSAXAttributes &attrs,
00214 SUMOVehicleParameter *ret, std::string element) throw(ProcessError);
00215
00216
00217 };
00218
00219
00220 #endif
00221
00222
00223