OGS
GeoType.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
GeoType.h
"
5
6
#include <cstdlib>
7
8
#include "
BaseLib/Error.h
"
9
10
namespace
GeoLib
11
{
12
std::string
convertGeoTypeToString
(
GEOTYPE
geo_type)
13
{
14
switch
(geo_type)
15
{
16
case
GEOTYPE::POINT
:
17
return
"POINT"
;
18
case
GEOTYPE::POLYLINE
:
19
return
"POLYLINE"
;
20
case
GEOTYPE::SURFACE
:
21
return
"SURFACE"
;
22
}
23
24
// Cannot happen, because switch covers all cases.
25
// Used to silence compiler warning.
26
OGS_FATAL
(
"convertGeoTypeToString(): Given geo type is not supported"
);
27
}
28
29
}
// end namespace GeoLib
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:19
GeoType.h
GeoLib
Definition
ProjectData.h:25
GeoLib::convertGeoTypeToString
std::string convertGeoTypeToString(GEOTYPE geo_type)
Definition
GeoType.cpp:12
GeoLib::GEOTYPE
GEOTYPE
Definition
GeoType.h:12
GeoLib::GEOTYPE::SURFACE
@ SURFACE
Definition
GeoType.h:15
GeoLib::GEOTYPE::POINT
@ POINT
Definition
GeoType.h:13
GeoLib::GEOTYPE::POLYLINE
@ POLYLINE
Definition
GeoType.h:14
GeoLib
GeoType.cpp
Generated by
1.14.0