swh:1:snp:6088ab52ef49920e01e3f334cdf4d5d6c8a822b9
Raw File
Tip revision: 6bcf628d5565f1c1474e27692072c5acd5e24ceb authored by wenqing on 05 July 2021, 15:55:36 UTC
Merge branch 'M_improvement' into 'master'
Tip revision: 6bcf628
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