OGS
ImportFileTypes.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <string>
7
12{
13public:
14 enum type
15 {
16 OGS = 0,
24#ifdef OGS_USE_NETCDF
26#endif // OGS_USE_NETCDF
33 };
34
36 {
38 return "FEFLOW";
39 if (t == ImportFileType::GMS)
40 return "SMS/GMS";
41 if (t == ImportFileType::GMSH)
42 return "GMSH";
44 return "Gocad TSurface";
45#ifdef OGS_USE_NETCDF
47 return "NetCDF";
48#endif // OGS_USE_NETCDF
49 if (t == ImportFileType::OGS)
50 return "OGS";
52 return "OGS geometry";
54 return "OGS station list";
56 return "OGS mesh";
58 return "Petrel";
60 return "Raster";
61 if (t == ImportFileType::SHAPE)
62 return "Shape";
63 else if (t == ImportFileType::TETGEN)
64 return "TetGen node";
65 else if (t == ImportFileType::VTK)
66 return "VTK";
67 else
68 return "";
69 }
70
72 {
74 return "FEFLOW files (*.fem)";
75 if (t == ImportFileType::GMS)
76 return "SMS/GMS files (*.txt *.2dm *.3dm)";
77 if (t == ImportFileType::GMSH)
78 return "GMSH mesh files (*.msh)";
80 return "Gocad TSurface files (*.ts)";
81#ifdef OGS_USE_NETCDF
83 return "NetCDF files (*.nc)";
84#endif // OGS_USE_NETCDF
85 if (t == ImportFileType::OGS)
86 return "OpenGeosys files (*.prj *.gml *.vtu *.stn);;GeoSys legacy "
87 "files (*.gli *.msh);;All files (* *.*)";
89 return "OpenGeosys files (*.gml *.gli)";
91 return "OpenGeosys files (*.stn)";
93 return "OpenGeosys files (*.vtu *.vtk *.msh)";
95 return "Petrel files (*)";
97 return "Raster files (*.asc *.grd *.xyz *.bmp *.jpg *.png *.tif)";
98 if (t == ImportFileType::SHAPE)
99 return "ESRI Shape files (*.shp)";
100 else if (t == ImportFileType::TETGEN)
101 return "TetGen node files (*.node *.poly *.smesh)";
102 else if (t == ImportFileType::VTK)
103 return "VTK files (*.vtk *.vti *.vtr *.vts *.vtp *.vtu)";
104 else
105 return "All files (*.*)";
106 }
107};
Types of supported import file formats.
static std::string getFileSuffixString(ImportFileType::type t)
static std::string convertImportFileTypeToString(ImportFileType::type t)