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 /****************************************************************************/
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 
NBPTStopCont
Definition: NBPTStopCont.h:28
NIXMLPTHandler::addPTLine
void addPTLine(const SUMOSAXAttributes &attrs)
Parses a public transport line.
Definition: NIXMLPTHandler.cpp:156
NIXMLPTHandler::myLineCont
NBPTLineCont & myLineCont
The line container (for loading of lines)
Definition: NIXMLPTHandler.h:137
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:61
SUMOSAXHandler
SAX-handler base for SUMO-files.
Definition: SUMOSAXHandler.h:42
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:58
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:179
SUMOSAXHandler.h
NIXMLPTHandler::myCurrentStop
NBPTStop * myCurrentStop
The currently processed stop.
Definition: NIXMLPTHandler.h:140
NBPTLine
Definition: NBPTLine.h:34
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:46
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:53
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:60
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:86
NIXMLPTHandler
Importer for network edges stored in XML.
Definition: NIXMLPTHandler.h:62
NBPTLineCont
Definition: NBPTLineCont.h:27
NIXMLPTHandler::myEdgeCont
NBEdgeCont & myEdgeCont
The edges container (for retrieving referenced stop edge)
Definition: NIXMLPTHandler.h:131
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:143
NIXMLPTHandler::tryGetLaneSpread
LaneSpreadFunction tryGetLaneSpread(const SUMOSAXAttributes &attrs)
Tries to parse the spread type.
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
NIXMLPTHandler::addPTStop
void addPTStop(const SUMOSAXAttributes &attrs)
Parses an public transport stop.
Definition: NIXMLPTHandler.cpp:113
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:96
NIXMLPTHandler::tryGetShape
PositionVector tryGetShape(const SUMOSAXAttributes &attrs)
Tries to parse the shape definition.
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:55
NIXMLPTHandler::myStopCont
NBPTStopCont & myStopCont
The stop container (for loading of stops)
Definition: NIXMLPTHandler.h:134
NIXMLPTHandler::myCurrentLine
NBPTLine * myCurrentLine
The currently processed line.
Definition: NIXMLPTHandler.h:143
LaneSpreadFunction
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
Definition: SUMOXMLDefinitions.h:1092
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:68
NBPTStop
The representation of a single pt stop.
Definition: NBPTStop.h:45
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57
PositionVector.h
NBEdge.h
NIXMLPTHandler::myCurrentCompletion
double myCurrentCompletion
the completion level of the current line
Definition: NIXMLPTHandler.h:146
NIXMLPTHandler::myLastParameterised
std::vector< Parameterised * > myLastParameterised
element to receive parameters
Definition: NIXMLPTHandler.h:149