Eclipse SUMO - Simulation of Urban MObility
PCLoaderXML.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 /****************************************************************************/
17 // A reader for polygons and pois stored in XML-format
18 /****************************************************************************/
19 #ifndef PCLoaderXML_h
20 #define PCLoaderXML_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include "PCPolyContainer.h"
30 #include "PCTypeMap.h"
33 
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
38 class OptionsCont;
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
51 class PCLoaderXML : public ShapeHandler {
52 public:
64  static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill,
65  PCTypeMap& tm);
66 
67 
68  Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat);
69 
70 protected:
77  PCTypeMap& tm, OptionsCont& oc);
78 
79 
81  ~PCLoaderXML();
82 
83 
84 protected:
86 
87 
95  virtual void myStartElement(int element, const SUMOSAXAttributes& attrs);
97 
98 
99 private:
102 
105 
106 };
107 
108 
109 #endif
110 
111 /****************************************************************************/
112 
PCLoaderXML::PCLoaderXML
PCLoaderXML(PCPolyContainer &toFill, PCTypeMap &tm, OptionsCont &oc)
Constructor.
Definition: PCLoaderXML.cpp:81
PCLoaderXML::myTypeMap
PCTypeMap & myTypeMap
The type map to use.
Definition: PCLoaderXML.h:101
PCTypeMap.h
PCLoaderXML::myOptions
OptionsCont & myOptions
Settings to use.
Definition: PCLoaderXML.h:104
PCLoaderXML::getLanePos
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get position for a given laneID (Has to be implemented in all child)
Definition: PCLoaderXML.cpp:125
PCPolyContainer.h
PCLoaderXML::~PCLoaderXML
~PCLoaderXML()
Destructor.
Definition: PCLoaderXML.cpp:87
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
UtilExceptions.h
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
PCLoaderXML
A reader for polygons and pois stored in XML-format.
Definition: PCLoaderXML.h:51
PCLoaderXML::myStartElement
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: PCLoaderXML.cpp:91
PCPolyContainer
A storage for loaded polygons and pois.
Definition: PCPolyContainer.h:51
config.h
ShapeHandler
The XML-Handler for network loading.
Definition: ShapeHandler.h:50
ShapeHandler.h
PCLoaderXML::loadIfSet
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as XML.
Definition: PCLoaderXML.cpp:55
PCTypeMap
A storage for type mappings.
Definition: PCTypeMap.h:45
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57