SUMO - Simulation of Urban MObility
RONetHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // The handler that parses a SUMO-network for its usage in a router
20 /****************************************************************************/
21 #ifndef RONetHandler_h
22 #define RONetHandler_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>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class RONet;
44 class OptionsCont;
45 class ROEdge;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
59 class RONetHandler : public SUMOSAXHandler {
60 public:
67 
68 
70  virtual ~RONetHandler();
71 
72 
73 protected:
75 
76 
84  virtual void myStartElement(int element, const SUMOSAXAttributes& attrs);
85 
92  virtual void myEndElement(int element);
94 
95 protected:
97 
98 
110  void parseEdge(const SUMOSAXAttributes& attrs);
111 
112 
121  virtual void parseLane(const SUMOSAXAttributes& attrs);
122 
123 
132  void parseJunction(const SUMOSAXAttributes& attrs);
133 
134 
139  void parseConnection(const SUMOSAXAttributes& attrs);
140 
141 
147  void parseStoppingPlace(const SUMOSAXAttributes& attrs, const SumoXMLTag element);
148 
149 
154  void parseAccess(const SUMOSAXAttributes& attrs);
155 
156 
166  void parseDistrict(const SUMOSAXAttributes& attrs);
167 
168 
180  void parseDistrictEdge(const SUMOSAXAttributes& attrs, bool isSource);
181 
183 
184 
185 protected:
188 
190  std::string myCurrentName;
191 
193  std::string myCurrentTypeID;
194 
197 
200 
203 
205  std::set<std::string> myUnseenNodeIDs;
206 
207 
208 private:
210  RONetHandler(const RONetHandler& src);
211 
213  RONetHandler& operator=(const RONetHandler& src);
214 
215 };
216 
217 
218 #endif
219 
220 /****************************************************************************/
221 
std::string myCurrentName
The name of the edge/node that is currently processed.
Definition: RONetHandler.h:190
SumoXMLTag
Numbers representing SUMO-XML - element names.
ROAbstractEdgeBuilder & myEdgeBuilder
The object used to build of edges of the desired type.
Definition: RONetHandler.h:202
SUMOVehicleParameter::Stop * myCurrentStoppingPlace
The currently built stopping place.
Definition: RONetHandler.h:199
void parseDistrict(const SUMOSAXAttributes &attrs)
void parseJunction(const SUMOSAXAttributes &attrs)
Parses a junction&#39;s position.
virtual void parseLane(const SUMOSAXAttributes &attrs)
Parses and builds a lane.
SAX-handler base for SUMO-files.
Interface for building instances of router-edges.
std::set< std::string > myUnseenNodeIDs
temporary data for checking node initialisation after network parsing is finished ...
Definition: RONetHandler.h:205
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
RONetHandler(RONet &net, ROAbstractEdgeBuilder &eb)
Constructor.
Encapsulated SAX-Attributes.
virtual ~RONetHandler()
Destructor.
A basic edge for routing applications.
Definition: ROEdge.h:77
The router&#39;s network representation.
Definition: RONet.h:74
RONetHandler & operator=(const RONetHandler &src)
Invalidated assignment operator.
Definition of vehicle stop (position and duration)
A storage for options typed value containers)
Definition: OptionsCont.h:98
The handler that parses a SUMO-network for its usage in a router.
Definition: RONetHandler.h:59
RONet & myNet
The net to store the information into.
Definition: RONetHandler.h:187
void parseConnection(const SUMOSAXAttributes &attrs)
virtual void myEndElement(int element)
Called when a closing tag occurs.
std::string myCurrentTypeID
The id of the currently processed edge type.
Definition: RONetHandler.h:193
void parseAccess(const SUMOSAXAttributes &attrs)
ROEdge * myCurrentEdge
The currently built edge.
Definition: RONetHandler.h:196
void parseDistrictEdge(const SUMOSAXAttributes &attrs, bool isSource)
void parseEdge(const SUMOSAXAttributes &attrs)
Parses and builds an edge.
void parseStoppingPlace(const SUMOSAXAttributes &attrs, const SumoXMLTag element)