https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: c418ff867cdf23d55150706457f82ce6e0b1f7a7 authored by KeitaYoshioka on 26 October 2021, 20:16:46 UTC
Merge branch 'PhaseField' into 'master'
Tip revision: c418ff8
GeoType.cpp
/**
 * \file
 * \author Thomas Fischer
 * \date   2010-12-01
 * \brief  Implementation of GEOTYPE enumeration helper functions.
 *
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#include "GeoType.h"

#include <cstdlib>

#include "BaseLib/Error.h"

namespace GeoLib
{
std::string convertGeoTypeToString(GEOTYPE geo_type)
{
    switch (geo_type)
    {
        case GEOTYPE::POINT:
            return "POINT";
        case GEOTYPE::POLYLINE:
            return "POLYLINE";
        case GEOTYPE::SURFACE:
            return "SURFACE";
    }

    // Cannot happen, because switch covers all cases.
    // Used to silence compiler warning.
    OGS_FATAL("convertGeoTypeToString(): Given geo type is not supported");
}

}  // end namespace GeoLib
back to top