Eclipse SUMO - Simulation of Urban MObility
PCNetProjectionLoader.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 a SUMO network's projection description
17 /****************************************************************************/
18 #ifndef PCNetProjectionLoader_h
19 #define PCNetProjectionLoader_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
30 #include <utils/geom/Position.h>
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
36 class OptionsCont;
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
47 public:
53  static void load(const std::string& file, double scale);
54 
55 
56 protected:
59  PCNetProjectionLoader(double scale);
60 
61 
64 
65 
69  bool hasReadAll() const;
70 
71 
72 protected:
74 
75 
83  virtual void myStartElement(int element,
84  const SUMOSAXAttributes& attrs);
86 
87 
88 private:
91 
93  double myScale;
94 
95 
96 };
97 
98 
99 #endif
100 
101 /****************************************************************************/
102 
PCNetProjectionLoader
A reader for a SUMO network's projection description.
Definition: PCNetProjectionLoader.h:46
SUMOSAXHandler
SAX-handler base for SUMO-files.
Definition: SUMOSAXHandler.h:41
PCNetProjectionLoader::PCNetProjectionLoader
PCNetProjectionLoader(double scale)
Constructor.
Definition: PCNetProjectionLoader.cpp:81
PCNetProjectionLoader::hasReadAll
bool hasReadAll() const
Returns whether all needed values were read.
Definition: PCNetProjectionLoader.cpp:112
SUMOSAXHandler.h
PCNetProjectionLoader::~PCNetProjectionLoader
~PCNetProjectionLoader()
Destructor.
Definition: PCNetProjectionLoader.cpp:88
PCNetProjectionLoader::myFoundLocation
bool myFoundLocation
Information whether the parameter was read.
Definition: PCNetProjectionLoader.h:90
PCNetProjectionLoader::myScale
double myScale
scaling of input coordinates (not given in the location element)
Definition: PCNetProjectionLoader.h:93
UtilExceptions.h
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
Position.h
PCNetProjectionLoader::load
static void load(const std::string &file, double scale)
Loads network projection if wished.
Definition: PCNetProjectionLoader.cpp:54
PCNetProjectionLoader::myStartElement
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: PCNetProjectionLoader.cpp:92
config.h
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56