swh:1:snp:6088ab52ef49920e01e3f334cdf4d5d6c8a822b9
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
GocadEnums.cpp
/**
 * \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 "GocadEnums.h"

namespace FileIO
{
namespace Gocad
{
std::string dataType2String(DataType const t)
{
    if (t == DataType::UNDEFINED)
    {
        return "[Undefined Type]";
    }
    if (t == DataType::VSET)
    {
        return "GOCAD VSet";
    }
    if (t == DataType::PLINE)
    {
        return "GOCAD PLine";
    }
    if (t == DataType::TSURF)
    {
        return "GOCAD TSurf";
    }
    if (t == DataType::MODEL3D)
    {
        return "GOCAD Model3d";
    }
    return "[all types]";
}

std::string dataType2ShortString(DataType const t)
{
    if (t == DataType::UNDEFINED)
    {
        return "[undefined]";
    }
    if (t == DataType::VSET)
    {
        return "vertices";
    }
    if (t == DataType::PLINE)
    {
        return "line";
    }
    if (t == DataType::TSURF)
    {
        return "surface";
    }
    if (t == DataType::MODEL3D)
    {
        return "model";
    }
    return "[all data]";
}

}  // namespace Gocad

}  // namespace FileIO
back to top