trikRuntime
|
Helper class for correct initialization of trikRuntime applications — TrikRun, TrikGui and TrikServer. More...
#include <applicationInitHelper.h>
Public Member Functions | |
ApplicationInitHelper (QCoreApplication &app) | |
Constructor. More... | |
~ApplicationInitHelper () | |
trikKernel::CommandLineParser & | commandLineParser () |
Returns temporary reference to command line options parser. More... | |
bool | parseCommandLine () |
Parses command line arguments. More... | |
void | init () |
Continues initialization of the application after the command line is parsed. More... | |
QString | configPath () const |
Returns path to a directory with config files, which is possibly received from command line. More... | |
Helper class for correct initialization of trikRuntime applications — TrikRun, TrikGui and TrikServer.
Usage scenario is to creae application object, create this helper, get command line parser from it and add needed additional command line options, then call "parseCommandLine", then, if it is successful, call "init", then take configPath, if needed.
|
explicit |
Constructor.
app | - application object, with filled applicationName field. |
ApplicationInitHelper::~ApplicationInitHelper | ( | ) |
trikKernel::CommandLineParser & ApplicationInitHelper::commandLineParser | ( | ) |
Returns temporary reference to command line options parser.
QString ApplicationInitHelper::configPath | ( | ) | const |
Returns path to a directory with config files, which is possibly received from command line.
void ApplicationInitHelper::init | ( | ) |
Continues initialization of the application after the command line is parsed.
bool ApplicationInitHelper::parseCommandLine | ( | ) |
Parses command line arguments.