OGS
GocadEnums.cpp
Go to the documentation of this file.
1
11#include "GocadEnums.h"
12
13namespace FileIO
14{
15namespace Gocad
16{
17std::string dataType2String(DataType const t)
18{
19 if (t == DataType::UNDEFINED)
20 {
21 return "[Undefined Type]";
22 }
23 if (t == DataType::VSET)
24 {
25 return "GOCAD VSet";
26 }
27 if (t == DataType::PLINE)
28 {
29 return "GOCAD PLine";
30 }
31 if (t == DataType::TSURF)
32 {
33 return "GOCAD TSurf";
34 }
35 if (t == DataType::MODEL3D)
36 {
37 return "GOCAD Model3d";
38 }
39 return "[all types]";
40}
41
42std::string dataType2ShortString(DataType const t)
43{
44 if (t == DataType::UNDEFINED)
45 {
46 return "[undefined]";
47 }
48 if (t == DataType::VSET)
49 {
50 return "vertices";
51 }
52 if (t == DataType::PLINE)
53 {
54 return "line";
55 }
56 if (t == DataType::TSURF)
57 {
58 return "surface";
59 }
60 if (t == DataType::MODEL3D)
61 {
62 return "model";
63 }
64 return "[all data]";
65}
66
67} // namespace Gocad
68
69} // namespace FileIO
std::string dataType2String(DataType const t)
Given a Gocad DataType this returns the appropriate string.
std::string dataType2ShortString(DataType const t)
Given a Gocad DataType this returns the appropriate short form.