SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // The handler that parses a SUMO-network for its usage in a router 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef RONetHandler_h 00023 #define RONetHandler_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <utils/xml/SUMOSAXHandler.h> 00037 #include <utils/common/SUMOVehicleClass.h> 00038 #include <utils/common/UtilExceptions.h> 00039 00040 00041 // =========================================================================== 00042 // class declarations 00043 // =========================================================================== 00044 class RONet; 00045 class OptionsCont; 00046 class ROEdge; 00047 class ROAbstractEdgeBuilder; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00060 class RONetHandler : public SUMOSAXHandler { 00061 public: 00067 RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb); 00068 00069 00071 virtual ~RONetHandler() ; 00072 00073 00074 protected: 00076 00077 00085 virtual void myStartElement(int element, 00086 const SUMOSAXAttributes& attrs) ; 00088 00089 protected: 00091 00092 00104 void parseEdge(const SUMOSAXAttributes& attrs); 00105 00106 00115 virtual void parseLane(const SUMOSAXAttributes& attrs); 00116 00117 00126 void parseJunction(const SUMOSAXAttributes& attrs); 00127 00128 00139 void parseConnectingEdge(const SUMOSAXAttributes& attrs) ; 00140 00141 00152 void parseConnectedEdge(const SUMOSAXAttributes& attrs); 00153 00154 00159 void parseConnection(const SUMOSAXAttributes& attrs); 00160 00161 00171 void parseDistrict(const SUMOSAXAttributes& attrs) ; 00172 00173 00185 void parseDistrictEdge(const SUMOSAXAttributes& attrs, bool isSource); 00186 00188 00189 00190 protected: 00192 RONet& myNet; 00193 00195 std::string myCurrentName; 00196 00198 ROEdge* myCurrentEdge; 00199 00201 bool myProcess; 00202 00204 ROAbstractEdgeBuilder& myEdgeBuilder; 00205 00206 bool myHaveWarnedAboutDeprecatedDistrict, myHaveWarnedAboutDeprecatedDSource, myHaveWarnedAboutDeprecatedDSink; 00207 00208 00209 private: 00211 RONetHandler(const RONetHandler& src); 00212 00214 RONetHandler& operator=(const RONetHandler& src); 00215 00216 }; 00217 00218 00219 #endif 00220 00221 /****************************************************************************/ 00222