1 #ifndef TORCCOMMANDLINE_H 2 #define TORCCOMMANDLINE_H 35 Q_DECLARE_FLAGS(Options,
Option)
43 int Evaluate (
int argc, const
char * const * argv,
bool &Exit);
44 void Add (const QString &Keys, const QVariant &Default, const QString &HelpText,
bool ExitImmediately);
45 QVariant
GetValue (const QString &Key);
48 void AddPriv (const QString &Keys, const QVariant &Default, const QString &HelpText,
TorcCommandLine::Options Flags =
TorcCommandLine::
None,
bool ExitImmediately = false);
52 QHash<QString,QString> m_aliases;
53 QHash<QString,QString> m_help;
61 TorcArgument(
const QVariant &Default,
const QString &HelpText, TorcCommandLine::Options Flags,
bool Exit);
69 Q_DECLARE_OPERATORS_FOR_FLAGS(TorcCommandLine::Options)
71 #endif // TORCCOMMANDLINE_H
Torc command line handler.
void Add(const QString &Keys, const QVariant &Default, const QString &HelpText, bool ExitImmediately)
Implement custom command line options.
static bool RegisterEnvironmentVariable(const QString &Var, const QString &Description)
Register an environment variable for display via the help option.
TorcCommandLine::Options m_flags
Simple wrapper around a command line argument.
int Evaluate(int argc, const char *const *argv, bool &Exit)
Evaluate the command line options.
QVariant GetValue(const QString &Key)
Return the value associated with Key or an invalid QVariant if the option is not present.