OGS
ImportFileTypes.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <string>
18
23{
24public:
25 enum type
26 {
27 OGS = 0,
35#ifdef OGS_USE_NETCDF
37#endif // OGS_USE_NETCDF
43 VTK
44 };
45
47 {
49 return "FEFLOW";
50 if (t == ImportFileType::GMS)
51 return "SMS/GMS";
52 if (t == ImportFileType::GMSH)
53 return "GMSH";
55 return "Gocad TSurface";
56#ifdef OGS_USE_NETCDF
58 return "NetCDF";
59#endif // OGS_USE_NETCDF
60 if (t == ImportFileType::OGS)
61 return "OGS";
63 return "OGS geometry";
65 return "OGS station list";
67 return "OGS mesh";
69 return "Petrel";
71 return "Raster";
72 if (t == ImportFileType::SHAPE)
73 return "Shape";
74 else if (t == ImportFileType::TETGEN)
75 return "TetGen node";
76 else if (t == ImportFileType::VTK)
77 return "VTK";
78 else
79 return "";
80 }
81
83 {
85 return "FEFLOW files (*.fem)";
86 if (t == ImportFileType::GMS)
87 return "SMS/GMS files (*.txt *.2dm *.3dm)";
88 if (t == ImportFileType::GMSH)
89 return "GMSH mesh files (*.msh)";
91 return "Gocad TSurface files (*.ts)";
92#ifdef OGS_USE_NETCDF
94 return "NetCDF files (*.nc)";
95#endif // OGS_USE_NETCDF
96 if (t == ImportFileType::OGS)
97 return "OpenGeosys files (*.prj *.gml *.vtu *.stn);;GeoSys legacy "
98 "files (*.gli *.msh);;All files (* *.*)";
100 return "OpenGeosys files (*.gml *.gli)";
102 return "OpenGeosys files (*.stn)";
104 return "OpenGeosys files (*.vtu *.vtk *.msh)";
105 if (t == ImportFileType::PETREL)
106 return "Petrel files (*)";
107 if (t == ImportFileType::RASTER)
108 return "Raster files (*.asc *.grd *.xyz *.bmp *.jpg *.png *.tif)";
109 if (t == ImportFileType::SHAPE)
110 return "ESRI Shape files (*.shp)";
111 else if (t == ImportFileType::TETGEN)
112 return "TetGen node files (*.node *.poly *.smesh)";
113 else if (t == ImportFileType::VTK)
114 return "VTK files (*.vtk *.vti *.vtr *.vts *.vtp *.vtu)";
115 else
116 return "All files (*.*)";
117 }
118};
Types of supported import file formats.
static std::string getFileSuffixString(ImportFileType::type t)
static std::string convertImportFileTypeToString(ImportFileType::type t)