swh:1:snp:f521c49ab17ef7db6ec70b2430e1ed203f50383f
Raw File
Tip revision: 32ff75854b3d473a8dbc5c9eab0f520225701e6b authored by Lars Bilke on 19 April 2021, 10:56:55 UTC
[T] Fixed a race condition in GocadTSurface_Mesh/Array_Test.
Tip revision: 32ff758
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