Texture Viewer
|
Public Member Functions | |
MainParser (const DescriptionMap &map) | |
void | process (const QStringList &arguments) |
Q_NORETURN void | showHelp (int code) |
Q_NORETURN void | showVersion () |
Static Public Member Functions | |
static void | showMessage (const QString &message) |
static void | showError (const QString &message) |
This is the parser for the arguments passed to main(). Checks that input arguments has format ./texturetool [common options] <tool> [options] and that <tool> is valid tool.
|
explicit |
Constructs MainParser object with the given DescriptionMap map.
void TextureTool::MainParser::process | ( | const QStringList & | arguments | ) |
Processes options. If an error occured, or help, or version is required, prints help and throws ExitException, which leads to program exit.
|
static |
Prints the given message to the sdterr stream.
void TextureTool::MainParser::showHelp | ( | int | code | ) |
Prints help and throws ExitException with the given code.
|
static |
Prints the given message to the sdtout stream.
void TextureTool::MainParser::showVersion | ( | ) |
Prints program version and throws ExitException with zero code.