Eclipse 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-2019 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 /****************************************************************************/
14 // Importer for static public transport information
15 /****************************************************************************/
16 #ifndef NIXMLPTHandler_h
17 #define NIXMLPTHandler_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
28 #include <netbuild/NBEdge.h>
29 #include <netbuild/NBEdgeCont.h>
30 
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class OptionsCont;
36 class NBNode;
37 class NBEdge;
38 class NBNodeCont;
39 class NBTypeCont;
40 class NBDistrictCont;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
62 public:
71 
72 
75 
76 protected:
78 
79 
87  void myStartElement(int element,
88  const SUMOSAXAttributes& attrs);
89 
90 
97  void myEndElement(int element);
99 
100 
101 private:
110 
111 
115 
116 
124  bool setNodes(const SUMOSAXAttributes& attrs);
125 
126 
127 private:
128 
131 
134 
137 
140 
143 
146 
148  std::vector<Parameterised*> myLastParameterised;
149 
150 private:
151 
155  void addPTStop(const SUMOSAXAttributes& attrs);
156 
160  void addRoute(const SUMOSAXAttributes& attrs);
161 
165  void addPTLineStop(const SUMOSAXAttributes& attrs);
166 
170  void addAccess(const SUMOSAXAttributes& attrs);
171 
175  void addPTLine(const SUMOSAXAttributes& attrs);
176 
177 
178 private:
181 
184 
185 };
186 
187 
188 #endif
189 
190 /****************************************************************************/
191 
NIXMLPTHandler::NIXMLPTHandler
NIXMLPTHandler(const NIXMLPTHandler &s)
invalid copy constructor
NBPTStopCont
Definition: NBPTStopCont.h:27
NIXMLPTHandler::addPTLine
void addPTLine(const SUMOSAXAttributes &attrs)
Parses a public transport line.
Definition: NIXMLPTHandler.cpp:159
NIXMLPTHandler::myLineCont
NBPTLineCont & myLineCont
The line container (for loading of lines)
Definition: NIXMLPTHandler.h:136
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
SUMOSAXHandler
SAX-handler base for SUMO-files.
Definition: SUMOSAXHandler.h:41
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:57
NIXMLPTHandler::~NIXMLPTHandler
~NIXMLPTHandler()
Destructor.
Definition: NIXMLPTHandler.cpp:60
NIXMLPTHandler::addPTLineStop
void addPTLineStop(const SUMOSAXAttributes &attrs)
Parses an public transport stop reference within a line element.
Definition: NIXMLPTHandler.cpp:199
SUMOSAXHandler.h
NIXMLPTHandler::myCurrentStop
NBPTStop * myCurrentStop
The currently processed stop.
Definition: NIXMLPTHandler.h:139
NBPTLine
Definition: NBPTLine.h:33
NBEdgeCont.h
NIXMLPTHandler::myStartElement
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: NIXMLPTHandler.cpp:64
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:52
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NIXMLPTHandler
Importer for network edges stored in XML.
Definition: NIXMLPTHandler.h:61
NBPTLineCont
Definition: NBPTLineCont.h:26
NIXMLPTHandler::myEdgeCont
NBEdgeCont & myEdgeCont
The edges container (for retrieving referenced stop edge)
Definition: NIXMLPTHandler.h:130
SUMOVehicleClass.h
NIXMLPTHandler::NIXMLPTHandler
NIXMLPTHandler(NBEdgeCont &ec, NBPTStopCont &sc, NBPTLineCont &lc)
Constructor.
Definition: NIXMLPTHandler.cpp:51
NIXMLPTHandler::addAccess
void addAccess(const SUMOSAXAttributes &attrs)
Parses an stop access definition.
Definition: NIXMLPTHandler.cpp:146
NIXMLPTHandler::tryGetLaneSpread
LaneSpreadFunction tryGetLaneSpread(const SUMOSAXAttributes &attrs)
Tries to parse the spread type.
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
NIXMLPTHandler::addPTStop
void addPTStop(const SUMOSAXAttributes &attrs)
Parses an public transport stop.
Definition: NIXMLPTHandler.cpp:116
NIXMLPTHandler::operator=
NIXMLPTHandler & operator=(const NIXMLPTHandler &s)
invalid assignment operator
NIXMLPTHandler::myEndElement
void myEndElement(int element)
Called when a closing tag occurs.
Definition: NIXMLPTHandler.cpp:99
NIXMLPTHandler::tryGetShape
PositionVector tryGetShape(const SUMOSAXAttributes &attrs)
Tries to parse the shape definition.
NIXMLPTHandler::addRoute
void addRoute(const SUMOSAXAttributes &attrs)
Parses a route as port of a public transport line.
Definition: NIXMLPTHandler.cpp:179
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:54
NIXMLPTHandler::myStopCont
NBPTStopCont & myStopCont
The stop container (for loading of stops)
Definition: NIXMLPTHandler.h:133
NIXMLPTHandler::myCurrentLine
NBPTLine * myCurrentLine
The currently processed line.
Definition: NIXMLPTHandler.h:142
LaneSpreadFunction
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
Definition: SUMOXMLDefinitions.h:1097
config.h
NIXMLPTHandler::setNodes
bool setNodes(const SUMOSAXAttributes &attrs)
Sets from/to node information of the currently parsed edge.
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
NBPTStop
The representation of a single pt stop.
Definition: NBPTStop.h:44
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
PositionVector.h
NBEdge.h
NIXMLPTHandler::myCurrentCompletion
double myCurrentCompletion
the completion level of the current line
Definition: NIXMLPTHandler.h:145
NIXMLPTHandler::myLastParameterised
std::vector< Parameterised * > myLastParameterised
element to receive parameters
Definition: NIXMLPTHandler.h:148