SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIImporter_DlrNavteq.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Importer for networks stored in Elmar's format
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef NIImporter_DlrNavteq_h
22 #define NIImporter_DlrNavteq_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <map>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class NBEdgeCont;
44 class NBNetBuilder;
45 class NBNodeCont;
47 class NBTypeCont;
48 class OptionsCont;
49 class PositionVector;
50 
51 
52 // ===========================================================================
53 // class definitions
54 // ===========================================================================
61 public:
73  static void loadNetwork(const OptionsCont& oc, NBNetBuilder& nb);
74 
76  static const int GEO_SCALE;
77 
78 protected:
87  class NodesHandler : public LineHandler {
88  public:
94  NodesHandler(NBNodeCont& nc, const std::string& file,
95  std::map<std::string, PositionVector>& geoms);
96 
97 
99  ~NodesHandler();
100 
101 
113  bool report(const std::string& result);
114 
115 
116  protected:
117  // @brief The node container to store parsed nodes into
119 
121  std::map<std::string, PositionVector>& myGeoms;
122 
123 
124  private:
126  NodesHandler(const NodesHandler&);
127 
130 
131  };
132 
133 
142  class EdgesHandler : public LineHandler {
143  public:
152  const std::string& file,
153  std::map<std::string, PositionVector>& geoms,
154  std::map<std::string, std::string>& streetNames);
155 
156 
158  ~EdgesHandler();
159 
160 
170  bool report(const std::string& result);
171 
172 
173  protected:
176 
179 
181  std::map<std::string, PositionVector>& myGeoms;
182 
184  std::map<std::string, std::string>& myStreetNames;
185 
188 
189  private:
191  std::string getStreetNameFromIDs(const std::string& regionalID, const std::string& localID) const;
192 
193 
194  private:
196  EdgesHandler(const EdgesHandler&);
197 
200 
201  };
202 
203 
213  public:
220  NBEdgeCont& ne, const std::string& file);
221 
222 
225 
226 
236  bool report(const std::string& result);
237 
238 
239  protected:
242 
245 
248 
249 
250  private:
253 
256 
257  };
258 
259 
268  class NamesHandler : public LineHandler {
269  public:
274  NamesHandler(const std::string& file, std::map<std::string, std::string>& streetNames);
275 
276 
278  ~NamesHandler();
279 
280 
290  bool report(const std::string& result);
291 
292 
293  protected:
295  std::map<std::string, std::string>& myStreetNames;
296 
297 
298  private:
300  NamesHandler(const NamesHandler&);
301 
304 
305  };
306 
307 };
308 
309 
310 #endif
311 
312 /****************************************************************************/
313