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.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // A reader for a SUMO network's projection description
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include <string>
28 #include <utils/geom/Position.h>
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
34 class OptionsCont;
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
45 public:
51  static void load(const std::string& file, double scale);
52 
53 
54 protected:
57  PCNetProjectionLoader(double scale);
58 
59 
62 
63 
67  bool hasReadAll() const;
68 
69 
70 protected:
72 
73 
81  virtual void myStartElement(int element,
82  const SUMOSAXAttributes& attrs);
84 
85 
86 private:
89 
91  double myScale;
92 
93 
94 };
A storage for options typed value containers)
Definition: OptionsCont.h:89
A reader for a SUMO network's projection description.
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
bool hasReadAll() const
Returns whether all needed values were read.
double myScale
scaling of input coordinates (not given in the location element)
PCNetProjectionLoader(double scale)
Constructor.
bool myFoundLocation
Information whether the parameter was read.
static void load(const std::string &file, double scale)
Loads network projection if wished.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.