trikRuntime
trikKernel::ApplicationInitHelper Class Reference

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::CommandLineParsercommandLineParser ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

ApplicationInitHelper::ApplicationInitHelper ( QCoreApplication &  app)
explicit

Constructor.

Parameters
app- application object, with filled applicationName field.
ApplicationInitHelper::~ApplicationInitHelper ( )

Member Function Documentation

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.

Returns
true, if parsing is successful. All errors will be reported by command line parser itself.

The documentation for this class was generated from the following files: