Go to the documentation of this file.
18 #ifndef __LIBAPP_ARGUMENTPARSER_H
19 #define __LIBAPP_ARGUMENTPARSER_H
106 const char *description);
118 const char *description,
String m_name
Program name.
Generic command-line argument parser.
String m_description
Program description.
void setDescription(const String &desc)
Set program description.
HashTable< String, Argument * > m_flags
Contains all registered flag arguments by name.
ArgumentParser()
Constructor.
Generic command-line argument parser.
virtual ~ArgumentParser()
Destructor.
Vector< Argument * > m_positionals
Contains all registered positional arguments.
unsigned int Size
Any sane size indicator cannot go negative.
Result registerFlag(char arg, const char *name, const char *description)
Register a flag Argument.
const String & name() const
Retrieve program name.
HashTable< String, Argument * > m_flagsId
Contains all registered flag arguments by single character identifier.
Result registerPositional(const char *name, const char *description, Size count=1)
Register a positional argument.
String getUsage() const
Get program usage.
void setName(const char *name)
Set program name.
Result parse(int argc, char **argv, ArgumentContainer &output)
Parse input arguments.