OGS
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 std::string convertGeoTypeToString(GEOTYPE geo_type)
24 {
25  switch (geo_type)
26  {
27  case GEOTYPE::POINT:
28  return "POINT";
29  case GEOTYPE::POLYLINE:
30  return "POLYLINE";
31  case GEOTYPE::SURFACE:
32  return "SURFACE";
33  }
34 
35  // Cannot happen, because switch covers all cases.
36  // Used to silence compiler warning.
37  OGS_FATAL("convertGeoTypeToString(): Given geo type is not supported");
38 }
39 
40 } // end namespace GeoLib
#define OGS_FATAL(...)
Definition: Error.h:26
Definition of the GEOTYPE enumeration.
GEOTYPE
Definition: GeoType.h:25
std::string convertGeoTypeToString(GEOTYPE geo_type)
Definition: GeoType.cpp:23