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-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 // Some helping functions for geometry parsing
20 /****************************************************************************/
21 #ifndef GeomConvHelper_h
22 #define GeomConvHelper_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>
36 #include <utils/geom/Boundary.h>
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
47 public:
59  static PositionVector parseShapeReporting(const std::string& shpdef, const std::string& objecttype,
60  const char* objectid, bool& ok, bool allowEmpty, bool report = true);
61 
62 
73  static Boundary parseBoundaryReporting(const std::string& def, const std::string& objecttype,
74  const char* objectid, bool& ok, bool report = true);
75 
76 
77 private:
85  static void emitError(bool report, const std::string& what, const std::string& objecttype,
86  const char* objectid, const std::string& desc);
87 
88 
89 };
90 
91 
92 #endif
93 
94 /****************************************************************************/
95 
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.
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 occured errors.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
A list of positions.
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 occured errors.