Image Formats NG
|
This is the parser for the arguments passed to main(). More...
Public Member Functions | |
MainParser (const DescriptionMap &map) | |
Constructs MainParser object with the given DescriptionMap map. | |
void | process (const QStringList &arguments) |
Processes options. More... | |
Q_NORETURN void | showHelp (int code) |
Prints help and throws ExitException with the given code. | |
Q_NORETURN void | showVersion () |
Prints program version and throws ExitException with zero code. | |
Static Public Member Functions | |
static void | showMessage (const QString &message) |
Prints the given message to the sdtout stream. | |
static void | showError (const QString &message) |
Prints the given message to the sdterr stream. | |
This is the parser for the arguments passed to main().
Checks that input arguments has format ./imagetool [common options] <tool> [options] and that <tool> is valid tool.
void ImageTool::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.