SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NIXMLConnectionsHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Importer for edge connections stored in XML
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NIXMLConnectionsHandler_h
23 #define NIXMLConnectionsHandler_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
36 #include <netbuild/NBConnection.h>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class NBEdge;
43 class NBEdgeCont;
45 class MsgHandler;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
59 public:
64 
65 
68 
69 
70 protected:
72 
73 
81  void myStartElement(int element,
82  const SUMOSAXAttributes& attrs);
84 
85 private:
94  NBConnection parseConnection(const std::string& defRole, const std::string& def);
95 
96 
102  void parseLaneBound(const SUMOSAXAttributes& attrs, NBEdge* from, NBEdge* to);
103 
104 
112  bool parseLaneInfo(const SUMOSAXAttributes& attributes, NBEdge* fromEdge, NBEdge* toEdge, int* fromLane, int* toLane);
113 
114 
122  inline bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes& attributes,
123  NBEdge* fromEdge, NBEdge* toEdge,
124  int* fromLane, int* toLane);
125 
126 
132  inline bool parseLaneDefinition(const SUMOSAXAttributes& attributes, int* fromLane, int* toLane);
133 
134 
138  void addCrossing(const SUMOSAXAttributes& attrs);
139 
140 private:
143 
147 
150 
153 
154 private:
157 
160 
161 
162 };
163 
164 
165 #endif
166 
167 /****************************************************************************/
168