NIImporter_DlrNavteq.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Importer for networks stored in Elmar's format
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef NIImporter_DlrNavteq_h
00020 #define NIImporter_DlrNavteq_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <string>
00033 #include <map>
00034 #include <utils/common/UtilExceptions.h>
00035 #include <utils/importio/LineHandler.h>
00036 
00037 
00038 // ===========================================================================
00039 // class declarations
00040 // ===========================================================================
00041 class NBEdgeCont;
00042 class NBNetBuilder;
00043 class NBNodeCont;
00044 class NBTrafficLightLogicCont;
00045 class NBTypeCont;
00046 class OptionsCont;
00047 class Position2DVector;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
00052 // ===========================================================================
00058 class NIImporter_DlrNavteq {
00059 public:
00071     static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb);
00072 
00073 
00074 protected:
00083     class NodesHandler : public LineHandler {
00084     public:
00090         NodesHandler(NBNodeCont &nc, const std::string &file,
00091                      std::map<std::string, Position2DVector> &geoms) throw();
00092 
00093 
00095         ~NodesHandler() throw();
00096 
00097 
00109         bool report(const std::string &result) throw(ProcessError);
00110 
00111 
00112     protected:
00113         // @brief The node container to store parsed nodes into
00114         NBNodeCont &myNodeCont;
00115 
00117         std::map<std::string, Position2DVector> &myGeoms;
00118 
00119 
00120     private:
00122         NodesHandler(const NodesHandler&);
00123 
00125         NodesHandler& operator=(const NodesHandler&);
00126 
00127     };
00128 
00129 
00138     class EdgesHandler : public LineHandler {
00139     public:
00146         EdgesHandler(NBNodeCont &nc, NBEdgeCont &ec,
00147                      const std::string &file, std::map<std::string, Position2DVector> &geoms) throw();
00148 
00149 
00151         ~EdgesHandler() throw();
00152 
00153 
00163         bool report(const std::string &result) throw(ProcessError);
00164 
00165 
00166     protected:
00168         NBNodeCont &myNodeCont;
00169 
00171         NBEdgeCont &myEdgeCont;
00172 
00174         std::map<std::string, Position2DVector> &myGeoms;
00175 
00177         bool myTryIgnoreNodePositions;
00178 
00179 
00180     private:
00182         EdgesHandler(const EdgesHandler&);
00183 
00185         EdgesHandler& operator=(const EdgesHandler&);
00186 
00187     };
00188 
00189 
00198     class TrafficlightsHandler : public LineHandler {
00199     public:
00205         TrafficlightsHandler(NBNodeCont &nc, NBTrafficLightLogicCont &tlc,
00206                              const std::string &file) throw();
00207 
00208 
00210         ~TrafficlightsHandler() throw();
00211 
00212 
00222         bool report(const std::string &result) throw(ProcessError);
00223 
00224 
00225     protected:
00227         NBNodeCont &myNodeCont;
00228 
00230         NBTrafficLightLogicCont &myTLLogicCont;
00231 
00232 
00233     private:
00235         TrafficlightsHandler(const TrafficlightsHandler&);
00236 
00238         TrafficlightsHandler& operator=(const TrafficlightsHandler&);
00239 
00240     };
00241 
00242 };
00243 
00244 
00245 #endif
00246 
00247 /****************************************************************************/
00248 

Generated on Wed May 5 00:06:34 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6