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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // A reader for polygons and pois stored in XML-format
20 /****************************************************************************/
21 #ifndef PCLoaderXML_h
22 #define PCLoaderXML_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include "PCPolyContainer.h"
36 #include "PCTypeMap.h"
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
44 class OptionsCont;
45 
46 
47 // ===========================================================================
48 // class declarations
49 // ===========================================================================
57 class PCLoaderXML : public ShapeHandler {
58 public:
70  static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill,
71  PCTypeMap& tm);
72 
73 
74  Position getLanePos(const std::string& poiID, const std::string& laneID, double lanePos, double lanePosLat);
75 
76 protected:
83  PCTypeMap& tm, OptionsCont& oc);
84 
85 
87  ~PCLoaderXML();
88 
89 
90 protected:
92 
93 
101  virtual void myStartElement(int element, const SUMOSAXAttributes& attrs);
103 
104 
105 private:
108 
111 
112 };
113 
114 
115 #endif
116 
117 /****************************************************************************/
118 
PCLoaderXML(PCPolyContainer &toFill, PCTypeMap &tm, OptionsCont &oc)
Constructor.
Definition: PCLoaderXML.cpp:85
A reader for polygons and pois stored in XML-format.
Definition: PCLoaderXML.h:57
PCTypeMap & myTypeMap
The type map to use.
Definition: PCLoaderXML.h:107
OptionsCont & myOptions
Settings to use.
Definition: PCLoaderXML.h:110
A storage for loaded polygons and pois.
The XML-Handler for network loading.
Definition: ShapeHandler.h:55
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get position for a given laneID
A storage for type mappings.
Definition: PCTypeMap.h:51
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:45
~PCLoaderXML()
Destructor.
Definition: PCLoaderXML.cpp:91
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: PCLoaderXML.cpp:95
A storage for options typed value containers)
Definition: OptionsCont.h:98
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as XML.
Definition: PCLoaderXML.cpp:60