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 /****************************************************************************/
16 // A reader for polygons and pois stored in XML-format
17 /****************************************************************************/
18 #ifndef PCLoaderXML_h
19 #define PCLoaderXML_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include "PCPolyContainer.h"
29 #include "PCTypeMap.h"
32 
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
37 class OptionsCont;
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
50 class PCLoaderXML : public ShapeHandler {
51 public:
63  static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill,
64  PCTypeMap& tm);
65 
66 
67  Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat);
68 
69 protected:
76  PCTypeMap& tm, OptionsCont& oc);
77 
78 
80  ~PCLoaderXML();
81 
82 
83 protected:
85 
86 
94  virtual void myStartElement(int element, const SUMOSAXAttributes& attrs);
96 
97 
98 private:
101 
104 
105 };
106 
107 
108 #endif
109 
110 /****************************************************************************/
111 
PCLoaderXML::PCLoaderXML
PCLoaderXML(PCPolyContainer &toFill, PCTypeMap &tm, OptionsCont &oc)
Constructor.
Definition: PCLoaderXML.cpp:79
PCLoaderXML::myTypeMap
PCTypeMap & myTypeMap
The type map to use.
Definition: PCLoaderXML.h:100
PCTypeMap.h
PCLoaderXML::myOptions
OptionsCont & myOptions
Settings to use.
Definition: PCLoaderXML.h:103
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:123
PCPolyContainer.h
PCLoaderXML::~PCLoaderXML
~PCLoaderXML()
Destructor.
Definition: PCLoaderXML.cpp:85
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
UtilExceptions.h
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
PCLoaderXML
A reader for polygons and pois stored in XML-format.
Definition: PCLoaderXML.h:50
PCLoaderXML::myStartElement
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: PCLoaderXML.cpp:89
PCPolyContainer
A storage for loaded polygons and pois.
Definition: PCPolyContainer.h:50
config.h
ShapeHandler
The XML-Handler for network loading.
Definition: ShapeHandler.h:49
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:54
PCTypeMap
A storage for type mappings.
Definition: PCTypeMap.h:44
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56