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