const char * get(const char *name) const
Get argument by name.
void usage() const
Print usage and terminate.
virtual ~Application()
Class destructor.
void setVersion(const String &version)
Set program version.
void setMinimumLogLevel(Level level)
Set the minimum logging level.
virtual int run()
Run the application.
String m_version
Program version.
Generic command-line argument parser.
virtual Result exec()=0
Execute the application event loop.
Application(int argc, char **argv)
Class constructor.
char ** m_argv
Input argument values.
virtual Result output(const char *string) const =0
Print text to output.
const ArgumentContainer & arguments() const
Get program arguments.
Generic command-line argument parser.
static const uint ExitFailure
Exit code for failure termination.
ArgumentContainer m_arguments
Parsed Arguments.
static Log * instance()
Retrieve the instance.
Result registerFlag(char arg, const char *name, const char *description)
Register a flag Argument.
static const uint ExitSuccess
Exit code for successful termination.
virtual Result initialize()
Initialize the application.
ArgumentParser & parser()
Get program arguments parser.
ArgumentParser m_parser
Program argument parser object.
String getUsage() const
Get program usage.
int m_argc
Input argument count.
void setName(const char *name)
Set program name.
Result parse(int argc, char **argv, ArgumentContainer &output)
Parse input arguments.