SUMO - Simulation of Urban MObility
NIXMLPTHandler.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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Importer for static public transport information
16 /****************************************************************************/
17 #ifndef NIXMLPTHandler_h
18 #define NIXMLPTHandler_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
29 #include <netbuild/NBEdge.h>
30 #include <netbuild/NBEdgeCont.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class OptionsCont;
37 class NBNode;
38 class NBEdge;
39 class NBNodeCont;
40 class NBTypeCont;
41 class NBDistrictCont;
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
63 public:
72 
73 
76 
77 protected:
79 
80 
88  void myStartElement(int element,
89  const SUMOSAXAttributes& attrs);
90 
91 
98  void myEndElement(int element);
100 
101 
102 private:
111 
112 
116 
117 
125  bool setNodes(const SUMOSAXAttributes& attrs);
126 
127 
128 private:
129 
132 
135 
138 
141 
144 
147 
149  std::vector<Parameterised*> myLastParameterised;
150 
151 private:
152 
156  void addPTStop(const SUMOSAXAttributes& attrs);
157 
161  void addPTLineStop(const SUMOSAXAttributes& attrs);
162 
166  void addAccess(const SUMOSAXAttributes& attrs);
167 
171  void addPTLine(const SUMOSAXAttributes& attrs);
172 
173 
174 private:
176  NIXMLPTHandler(const NIXMLPTHandler& s);
177 
180 
181 };
182 
183 
184 #endif
185 
186 /****************************************************************************/
187 
void myEndElement(int element)
Called when a closing tag occurs.
void addAccess(const SUMOSAXAttributes &attrs)
Parses an stop access definition.
void addPTStop(const SUMOSAXAttributes &attrs)
Parses an public transport stop.
NIXMLPTHandler & operator=(const NIXMLPTHandler &s)
invalid assignment operator
A container for traffic light definitions and built programs.
PositionVector tryGetShape(const SUMOSAXAttributes &attrs)
Tries to parse the shape definition.
The representation of a single edge during network building.
Definition: NBEdge.h:65
A container for districts.
bool setNodes(const SUMOSAXAttributes &attrs)
Sets from/to node information of the currently parsed edge.
The representation of a single pt stop.
Definition: NBPTStop.h:45
SAX-handler base for SUMO-files.
NBPTStopCont & myStopCont
The stop container (for loading of stops)
NBPTLine * myCurrentLine
The currently processed line.
std::vector< Parameterised * > myLastParameterised
element to receive parameters
double myCurrentCompletion
the completion level of the current line
Encapsulated SAX-Attributes.
A list of positions.
Importer for network edges stored in XML.
NBPTLineCont & myLineCont
The line container (for loading of lines)
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:61
~NIXMLPTHandler()
Destructor.
void addPTLine(const SUMOSAXAttributes &attrs)
Parses a public transport line.
NBPTStop * myCurrentStop
The currently processed stop.
void addPTLineStop(const SUMOSAXAttributes &attrs)
Parses an public transport stop reference within a line element.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
A storage for options typed value containers)
Definition: OptionsCont.h:92
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge&#39;s lateral offset shal...
Represents a single node (junction) during network building.
Definition: NBNode.h:68
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:60
NBEdgeCont & myEdgeCont
The edges container (for retrieving referenced stop edge)
NIXMLPTHandler(NBEdgeCont &ec, NBPTStopCont &sc, NBPTLineCont &lc)
Constructor.
LaneSpreadFunction tryGetLaneSpread(const SUMOSAXAttributes &attrs)
Tries to parse the spread type.
A storage for available types of edges.
Definition: NBTypeCont.h:55