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.sourceforge.net/
12 // Copyright (C) 2001-2013 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;
44 class MsgHandler;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
58 public:
63 
64 
67 
68 
69 protected:
71 
72 
80  void myStartElement(int element,
81  const SUMOSAXAttributes& attrs);
83 
84 private:
93  NBConnection parseConnection(const std::string& defRole, const std::string& def);
94 
95 
101  void parseLaneBound(const SUMOSAXAttributes& attrs, NBEdge* from, NBEdge* to);
102 
103 
111  bool parseLaneInfo(const SUMOSAXAttributes& attributes, NBEdge* fromEdge, NBEdge* toEdge, int* fromLane, int* toLane);
112 
113 
121  inline bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes& attributes,
122  NBEdge* fromEdge, NBEdge* toEdge,
123  int* fromLane, int* toLane);
124 
125 
131  inline bool parseLaneDefinition(const SUMOSAXAttributes& attributes, int* fromLane, int* toLane);
132 
141  bool validateLaneInfo(bool canLanesBeNegative, NBEdge* fromEdge, NBEdge* toEdge, int fromLane, int toLane);
142 
143 
144 private:
147 
150 
153 
154 private:
157 
160 
161 
162 };
163 
164 
165 #endif
166 
167 /****************************************************************************/
168