RORDLoader_SUMOBase.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef RORDLoader_SUMOBase_h
00020 #define RORDLoader_SUMOBase_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 "ROTypedXMLRoutesLoader.h"
00034 #include <utils/xml/SUMOXMLDefinitions.h>
00035 #include <utils/common/RGBColor.h>
00036 #include <utils/common/SUMOVehicleParameter.h>
00037
00038
00039
00040
00041
00042 class SUMOVTypeParameter;
00043 class RORouteDef;
00044 class MsgHandler;
00045 class RORouteDef_Alternatives;
00046 class RORouteDef_Complete;
00047 class RORoute;
00048
00049
00050
00051
00052
00061 class RORDLoader_SUMOBase :
00062 public ROTypedXMLRoutesLoader {
00063 public:
00065 RORDLoader_SUMOBase(RONet &net,
00066 SUMOTime begin, SUMOTime end,
00067 SUMOReal gawronBeta, SUMOReal gawronA,
00068 int maxRouteNumber, bool tryRepair, bool withTaz,
00069 const std::string &file="") throw(ProcessError);
00070
00072 ~RORDLoader_SUMOBase() throw();
00073
00074
00076
00077
00082 SUMOTime getLastReadTimeStep() const throw() {
00083 return myCurrentDepart;
00084 }
00086
00087
00088 protected:
00090
00091
00099 virtual void myStartElement(SumoXMLTag element,
00100 const SUMOSAXAttributes &attrs) throw(ProcessError);
00101
00102
00110 void myCharacters(SumoXMLTag element,
00111 const std::string &chars) throw(ProcessError);
00112
00113
00120 virtual void myEndElement(SumoXMLTag element) throw(ProcessError);
00122
00124 void startAlternative(const SUMOSAXAttributes &attrs);
00125
00127 void startRoute(const SUMOSAXAttributes &attrs);
00128
00129 bool closeVehicle() throw();
00130
00131
00132
00135
00141 bool nextRouteRead() throw() {
00142 return myHaveNextRoute;
00143 }
00144
00145
00151 void beginNextRoute() throw();
00153
00154
00155 protected:
00157 SUMOVehicleParameter *myVehicleParameter;
00158
00160 RGBColor *myColor;
00161
00163 bool myCurrentIsOk;
00164
00166 bool myAltIsValid;
00167
00169 bool myHaveNextRoute;
00170
00172 RORouteDef_Alternatives *myCurrentAlternatives;
00173
00175 SUMOReal myCost;
00176
00178 SUMOReal myProbability;
00179
00181 SUMOReal myGawronBeta;
00182
00184 SUMOReal myGawronA;
00185
00187 int myMaxRouteNumber;
00188
00190 bool myTryRepair;
00191
00193 const bool myWithTaz;
00194
00196 RORouteDef_Complete *myCurrentRoute;
00197
00199 std::string myCurrentRouteName;
00200
00202 SUMOTime myCurrentDepart;
00203
00205 SUMOVTypeParameter *myCurrentVType;
00206
00207 private:
00209 RORDLoader_SUMOBase(const RORDLoader_SUMOBase &src);
00210
00212 RORDLoader_SUMOBase &operator=(const RORDLoader_SUMOBase &src);
00213
00214 };
00215
00216
00217 #endif
00218
00219
00220