43 lines
1.0 KiB
C++
Executable File
43 lines
1.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* main for OC-connections to SFM
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Philipp Dassow, NLST, 2018-01-23
|
|
*/
|
|
|
|
#include <nglapplication/nglcoreapplication.h>
|
|
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
|
#include <QNetworkProxy>
|
|
#include <memory>
|
|
#include "main_handler.h"
|
|
#include "settings.h"
|
|
#include "logger.h"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
NGLCoreApplication app(argc, argv);
|
|
QNetworkProxy::setApplicationProxy(QNetworkProxy());
|
|
|
|
int iRet = -1;
|
|
LtsCommandLineParser::LtsCommandLineParser options;
|
|
if (!options.init())
|
|
return iRet;
|
|
app.createLogger("TABOC", options.exerciseId());
|
|
|
|
TrainingAreaBaseOC::Settings::setIniFile(options.iniFile());
|
|
|
|
{
|
|
std::unique_ptr<TrainingAreaBaseOC::MainHandler> mainHandler(new TrainingAreaBaseOC::MainHandler);
|
|
if (mainHandler->init(options.domainId(), options.exerciseId()))
|
|
{
|
|
STARTUP_LOG(app.baseLogger());
|
|
iRet = app.exec();
|
|
SHUTDOWN_LOG(app.baseLogger());
|
|
}
|
|
}
|
|
|
|
return iRet;
|
|
}
|