OGS
main.cpp File Reference

Detailed Description

Definition in file main.cpp.

#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 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 20 of file main.cpp.

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

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