Eclipse SUMO - Simulation of Urban MObility
GeomConvHelper.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 // Some helping functions for geometry parsing
17 /****************************************************************************/
18 #ifndef GeomConvHelper_h
19 #define GeomConvHelper_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
29 #include <utils/geom/Boundary.h>
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
40 public:
52  static PositionVector parseShapeReporting(const std::string& shpdef, const std::string& objecttype,
53  const char* objectid, bool& ok, bool allowEmpty, bool report = true);
54 
55 
66  static Boundary parseBoundaryReporting(const std::string& def, const std::string& objecttype,
67  const char* objectid, bool& ok, bool report = true);
68 
69 
70 private:
78  static void emitError(bool report, const std::string& what, const std::string& objecttype,
79  const char* objectid, const std::string& desc);
80 
81 
82 };
83 
84 
85 #endif
86 
87 /****************************************************************************/
88 
Boundary.h
PositionVector
A list of positions.
Definition: PositionVector.h:45
GeomConvHelper::parseBoundaryReporting
static Boundary parseBoundaryReporting(const std::string &def, const std::string &objecttype, const char *objectid, bool &ok, bool report=true)
Builds a boundary from its string representation, reporting occurred errors.
Definition: GeomConvHelper.cpp:80
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GeomConvHelper
Definition: GeomConvHelper.h:39
config.h
PositionVector.h
GeomConvHelper::emitError
static void emitError(bool report, const std::string &what, const std::string &objecttype, const char *objectid, const std::string &desc)
Writes an error message into the MessageHandler.
Definition: GeomConvHelper.cpp:105
GeomConvHelper::parseShapeReporting
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occurred errors.
Definition: GeomConvHelper.cpp:38