Skip to content
Snippets Groups Projects
Commit 31a12c55 authored by Karsten Rink's avatar Karsten Rink Committed by Tom Fischer
Browse files

added missing enum-definitions

parent 5d69d7d1
No related branches found
No related tags found
No related merge requests found
/**
* \copyright
* Copyright (c) 2012-2019, 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 DataType2Str(DataType const t)
{
if (t == DataType::UNDEFINED)
{
return "[Undefinied 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 DataType2ShortStr(DataType const t)
{
if (t == DataType::UNDEFINED)
{
return "[undefinied]";
}
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
/**
* \copyright
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <string>
namespace FileIO
{
namespace Gocad
{
enum class DataType
{
UNDEFINED,
VSET,
PLINE,
TSURF,
MODEL3D,
ALL
};
/// Given a Gocad DataType this returns the appropriate string.
std::string DataType2Str(DataType const t);
/// Given a Gocad DataType this returns the appropriate short form.
std::string DataType2ShortStr(DataType const t);
} // namespace GocadIO
} // namespace FileIO
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment