OGS 6.2.0-97-g4a610c866
GeoType.cpp
Go to the documentation of this file.
1 
15 #include "GeoType.h"
16 
17 #include <cstdlib>
18 
19 #include "BaseLib/Error.h"
20 
21 namespace GeoLib
22 {
23 
24 std::string convertGeoTypeToString (GEOTYPE geo_type)
25 {
26  switch (geo_type)
27  {
28  case GEOTYPE::POINT: return "POINT";
29  case GEOTYPE::POLYLINE: return "POLYLINE";
30  case GEOTYPE::SURFACE: return "SURFACE";
31  }
32 
33  // Cannot happen, because switch covers all cases.
34  // Used to silence compiler warning.
35  OGS_FATAL("convertGeoTypeToString(): Given geo type is not supported");
36 }
37 
38 } // end namespace GeoLib
GEOTYPE
Definition: GeoType.h:25
Definition of the GEOTYPE enumeration.
Definition of the GEOObjects class.
Definition: BaseItem.h:20
#define OGS_FATAL(fmt,...)
Definition: Error.h:63
std::string convertGeoTypeToString(GEOTYPE geo_type)
Definition: GeoType.cpp:24