SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // Importer for networks stored in Elmar's format 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 NIImporter_DlrNavteq_h 00022 #define NIImporter_DlrNavteq_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 <string> 00035 #include <map> 00036 #include <utils/common/UtilExceptions.h> 00037 #include <utils/importio/LineHandler.h> 00038 00039 00040 // =========================================================================== 00041 // class declarations 00042 // =========================================================================== 00043 class NBEdgeCont; 00044 class NBNetBuilder; 00045 class NBNodeCont; 00046 class NBTrafficLightLogicCont; 00047 class NBTypeCont; 00048 class OptionsCont; 00049 class PositionVector; 00050 00051 00052 // =========================================================================== 00053 // class definitions 00054 // =========================================================================== 00060 class NIImporter_DlrNavteq { 00061 public: 00073 static void loadNetwork(const OptionsCont& oc, NBNetBuilder& nb); 00074 00075 00076 protected: 00085 class NodesHandler : public LineHandler { 00086 public: 00092 NodesHandler(NBNodeCont& nc, const std::string& file, 00093 std::map<std::string, PositionVector> &geoms) ; 00094 00095 00097 ~NodesHandler() ; 00098 00099 00111 bool report(const std::string& result) ; 00112 00113 00114 protected: 00115 // @brief The node container to store parsed nodes into 00116 NBNodeCont& myNodeCont; 00117 00119 std::map<std::string, PositionVector> &myGeoms; 00120 00121 00122 private: 00124 NodesHandler(const NodesHandler&); 00125 00127 NodesHandler& operator=(const NodesHandler&); 00128 00129 }; 00130 00131 00140 class EdgesHandler : public LineHandler { 00141 public: 00148 EdgesHandler(NBNodeCont& nc, NBEdgeCont& ec, 00149 const std::string& file, std::map<std::string, PositionVector> &geoms) ; 00150 00151 00153 ~EdgesHandler() ; 00154 00155 00165 bool report(const std::string& result) ; 00166 00167 00168 protected: 00170 NBNodeCont& myNodeCont; 00171 00173 NBEdgeCont& myEdgeCont; 00174 00176 std::map<std::string, PositionVector> &myGeoms; 00177 00179 bool myTryIgnoreNodePositions; 00180 00181 00182 private: 00184 EdgesHandler(const EdgesHandler&); 00185 00187 EdgesHandler& operator=(const EdgesHandler&); 00188 00189 }; 00190 00191 00200 class TrafficlightsHandler : public LineHandler { 00201 public: 00207 TrafficlightsHandler(NBNodeCont& nc, NBTrafficLightLogicCont& tlc, 00208 const std::string& file) ; 00209 00210 00212 ~TrafficlightsHandler() ; 00213 00214 00224 bool report(const std::string& result) ; 00225 00226 00227 protected: 00229 NBNodeCont& myNodeCont; 00230 00232 NBTrafficLightLogicCont& myTLLogicCont; 00233 00234 00235 private: 00237 TrafficlightsHandler(const TrafficlightsHandler&); 00238 00240 TrafficlightsHandler& operator=(const TrafficlightsHandler&); 00241 00242 }; 00243 00244 }; 00245 00246 00247 #endif 00248 00249 /****************************************************************************/ 00250