SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ODDistrictHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // An XML-Handler for districts
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 ODDistrictHandler_h
23 #define ODDistrictHandler_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 
35 #include <string>
36 #include <utility>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class ODDistrict;
44 class ODDistrictCont;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
58 public:
65  ODDistrictHandler(ODDistrictCont& cont, const std::string& file);
66 
67 
70 
71 
72 protected:
74 
75 
86  void myStartElement(int element,
87  const SUMOSAXAttributes& attrs);
88 
89 
97  void myEndElement(int element);
99 
100 
101 private:
110  void openDistrict(const SUMOSAXAttributes& attrs);
111 
112 
124  void addSource(const SUMOSAXAttributes& attrs);
125 
126 
138  void addSink(const SUMOSAXAttributes& attrs);
139 
140 
145  void closeDistrict();
146 
147 
163  std::pair<std::string, SUMOReal> parseConnection(const SUMOSAXAttributes& attrs);
164 
165 private:
168 
171 
172 
173 private:
176 
179 
180 
181 };
182 
183 
184 #endif
185 
186 /****************************************************************************/
187