Go to the documentation of this file.
41 for (
Size i = 0; i < positionals.
count(); i++)
42 printf(
"%s ", *(positionals[i]->getValue()));
45 if (no_newline ==
NULL)
const char * get(const char *name) const
Get argument by name.
POSIX-compatible application.
const ArgumentContainer & arguments() const
Get program arguments.
void setDescription(const String &desc)
Set program description.
virtual ~Echo()
Destructor.
int printf(const char *format,...)
Output a formatted string to standard output.
virtual Result exec()
Execute the application.
virtual Size count() const
Returns the number of items inside the Vector.
#define NULL
NULL means zero.
unsigned int Size
Any sane size indicator cannot go negative.
Result registerFlag(char arg, const char *name, const char *description)
Register a flag Argument.
Echo(int argc, char **argv)
Constructor.
Result registerPositional(const char *name, const char *description, Size count=1)
Register a positional argument.
ArgumentParser & parser()
Get program arguments parser.
const Vector< Argument * > & getPositionals() const
Get positional arguments.