SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // A class that performs the loading of routes 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef MSRouteLoader_h 00022 #define MSRouteLoader_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include <xercesc/sax2/XMLReaderFactory.hpp> 00035 #include <string> 00036 #include <microsim/MSNet.h> 00037 #include "MSVehicleContainer.h" 00038 #include "MSRouteHandler.h" 00039 00040 00041 // =========================================================================== 00042 // class definitions 00043 // =========================================================================== 00047 class MSRouteLoader { 00048 public: 00050 MSRouteLoader(MSNet& net, 00051 MSRouteHandler* handler); 00052 00054 ~MSRouteLoader(); 00055 00058 void loadUntil(SUMOTime time); 00059 00061 void init(); 00062 00064 bool moreAvailable() const; 00065 private: 00067 SAX2XMLReader* myParser; 00068 00070 XMLPScanToken myToken; 00071 00073 bool myMoreAvailable; 00074 00075 MSRouteHandler* myHandler; 00076 00077 }; 00078 00079 00080 #endif 00081 00082 /****************************************************************************/ 00083