Workspace 6.21.5
Public Member Functions | Protected Member Functions | List of all members
OOPScheduleeArgumentsParser Class Reference

Helper class for dealing with command line arguments supplied to an OOP schedulee application. More...

#include <Workspace/Application/oopscheduleeargumentsparser.h>

Inheritance diagram for OOPScheduleeArgumentsParser:
[legend]

Public Member Functions

 OOPScheduleeArgumentsParser (const QStringList &expectedArguments=QStringList(), const QString &usageHeader=QString())
 
int exitWithProcess () const
 
QString getIpcName () const
 
int getMaxRetryCount () const
 
bool getPluginErrorTracking () const
 
QString getServiceName () const
 
QMap< QString, bool > logCategories () const
 
bool logToIpc () const
 
bool reportWorkspaceProgress () const
 
bool runAsWorker () const
 
bool saveOnExit () const
 
bool usedPluginsOnly () const
 
- Public Member Functions inherited from WorkspaceArgumentsParser
 WorkspaceArgumentsParser (const QStringList &expectedArguments=QStringList(), const QString &usageHeader=QString())
 
- Public Member Functions inherited from ArgumentsParser
 ArgumentsParser (ArgumentsParser &&args)
 
 ArgumentsParser (const ArgumentsParser &args)
 
 ArgumentsParser (const QStringList &expectedArguments=QStringList(), const QString &usageHeader="")
 
virtual ~ArgumentsParser ()
 
QString argument (int index) const
 
bool flagExists (const QString &name) const
 
int flagOccurrence (const QString &name) const
 
QString flagParameter (const QString &name, int paramIndex, int occurrence=0) const
 
QStringList flagParameters (const QString &name, int occurrence=0) const
 
const QStringListgetArguments () const
 
int numArguments () const
 
ArgumentsParseroperator= (ArgumentsParser args)
 
bool parse (const QStringList &arguments, int &exitCode)
 
virtual QString usage () const
 

Protected Member Functions

bool validate (int &exitCode) override
 
- Protected Member Functions inherited from WorkspaceArgumentsParser
bool validate (int &exitCode) override
 
- Protected Member Functions inherited from ArgumentsParser
void addSupportedFlag (const QString &name, const QString &description, int numParameters=0, const QStringList &paramNames=QStringList(), bool developOnly=false)
 
void logError (const QString &msg)
 
void purgeArgument (int index)
 
void purgeFlag (const QString &name, int occurrence=0)
 
virtual bool validate (int &exitCode)
 

Additional Inherited Members

- Static Public Member Functions inherited from ArgumentsParser
static bool parseBoolean (const QString &s)
 
static bool validBoolean (const QString &s)
 

Detailed Description

Workspace applications may use this class as is, or they may subclass it further to add their own flags to the standard set of options. Subclass impmlementors should note that validate() returns an exit code of 1 if it encounters any problems in the arguments (in which case it also returns false to indicate failure).

Constructor & Destructor Documentation

◆ OOPScheduleeArgumentsParser()

OOPScheduleeArgumentsParser ( const QStringList expectedArguments = QStringList(),
const QString &  usageHeader = QString() 
)

Member Function Documentation

◆ exitWithProcess()

int exitWithProcess ( ) const
Returns
True if the batch process should exit when a given process exited.

◆ getIpcName()

QString getIpcName ( ) const
Returns
Name of Ipc channel.

◆ getMaxRetryCount()

int getMaxRetryCount ( ) const
Returns
Max retry count when scheduling the job.

◆ getPluginErrorTracking()

bool getPluginErrorTracking ( ) const
Returns
whether to track error plugins.

◆ getServiceName()

QString getServiceName ( ) const
Returns
Service name.

◆ logCategories()

QMap< QString, bool > logCategories ( ) const
Returns
A map of log categories that need to be enabled/disabled.

◆ logToIpc()

bool logToIpc ( ) const
Returns
whether to forward log to Ipc channel.

◆ reportWorkspaceProgress()

bool reportWorkspaceProgress ( ) const
Returns
True if the batch process should report on internal workspace progress event messages

◆ runAsWorker()

bool runAsWorker ( ) const
Returns
True is the batch is being used as a worker to process workspaces

◆ saveOnExit()

bool saveOnExit ( ) const
Returns
True if the batch process should save any executed workspaces upon completion

◆ usedPluginsOnly()

bool usedPluginsOnly ( ) const
Returns
whether to load used plugins only.

◆ validate()

bool validate ( int &  exitCode)
overrideprotectedvirtual
Parameters
exitCodeUpon returning, this will be set to 1 if any errors are encountered, in which case validate() will also return false.

Reimplemented from ArgumentsParser.