OGS
main.cpp File Reference
#include <tclap/CmdLine.h>
#include <QApplication>
#include <clocale>
#include "BaseLib/Logging.h"
#include "BaseLib/TCLAPArguments.h"
#include "InfoLib/GitInfo.h"
#include "OGSFileConverter.h"
Include dependency graph for Utils/OGSFileConverter/main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 14 of file Utils/OGSFileConverter/main.cpp.

15{
16 TCLAP::CmdLine cmd(
17 "A conversion tool for ogs5 and ogs6 files.\n\n"
18 "OpenGeoSys-6 software, version " +
20 ".\n"
21 "Copyright (c) 2012-2026, OpenGeoSys Community "
22 "(http://www.opengeosys.org)",
24 TCLAP::ValueArg<std::string> gmsh_path_arg(
25 "g", "gmsh-path",
26 "Input (.msh). The path to the input gmsh binary file", false, "",
27 "INPUT_FILE");
28 cmd.add(gmsh_path_arg);
29 auto log_level_arg = BaseLib::makeLogLevelArg();
30 cmd.add(log_level_arg);
31 cmd.parse(argc, argv);
32 BaseLib::initOGSLogger(log_level_arg.getValue());
33 QApplication app(argc, argv);
34 setlocale(LC_NUMERIC, "C");
35 auto* fc = new OGSFileConverter(gmsh_path_arg.getValue());
36 fc->setWindowTitle(fc->windowTitle());
37 fc->show();
38 int returncode = QApplication::exec();
39 delete fc;
40
41 return returncode;
42}
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
Definition Logging.cpp:56
GITINFOLIB_EXPORT const std::string ogs_version

References BaseLib::initOGSLogger(), BaseLib::makeLogLevelArg(), and GitInfoLib::GitInfo::ogs_version.