|
| CmdLine (CmdLineOpts opt=Empty) |
| Construct empty CmdLine.
|
|
| CmdLine (int argc, const char *const *argv, CmdLineOpts opt=Empty) |
| Construct CmdLine with set command line arguments.
|
|
virtual | ~CmdLine () |
|
CmdLineOpts | parserOptions () const |
|
void | addArg (ArgIface *arg) |
| Add argument.
|
|
void | addArg (ArgIface &arg) |
| Add argument.
|
|
void | addArg (ArgPtr arg) |
| Add argument.
|
|
void | parse () |
| Parse arguments.
|
|
void | parse (int argc, const char *const *argv) |
| Parse arguments.
|
|
const StringList & | positional () const |
|
const String & | positionalDescription () const |
|
void | setPositionalDescription (const String &d) |
| Set positional string description for the help.
|
|
ArgIface * | findArgument (const String &name) |
|
const ArgIface * | findArgument (const String &name) const |
|
const Arguments & | arguments () const |
|
bool | isMisspelledName (const String &name, StringList &possibleNames) const |
|
CmdLine & | addHelp (bool throwExceptionOnPrint=true, const String &appExe=String(), const String &appDesc=String(), String::size_type length=79, const String &posDesc=String()) |
| Add help.
|
|
template<typename T > |
void | addHelp (T throwExceptionOnPrint, const String &appExe=String(), const String &appDesc=String(), String::size_type length=79)=delete |
|
String | value (const String &name) const |
|
StringList | values (const String &name) const |
|
bool | isDefined (const String &name) const |
|
void | clear () |
| Clear state of the arguments.
|
|
| API (PARENT &parent, SELF &self) |
|
virtual | ~API () |
|
template<typename NAME > |
API< PARENT, OnlyOneGroup, ARGPTR, false > | addOnlyOneGroup (NAME &&name, bool required=false) |
| Add OnlyOneGroup.
|
|
template<typename NAME > |
API< PARENT, AllOfGroup, ARGPTR, false > | addAllOfGroup (NAME &&name, bool required=false) |
| Add AllOfGroup.
|
|
template<typename NAME > |
API< PARENT, AtLeastOneGroup, ARGPTR, false > | addAtLeastOneGroup (NAME &&name, bool required=false) |
| Add AtLeastOneGroup.
|
|
template<typename NAME > |
PARENT & | addArgWithFlagAndName (Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add argument.
|
|
PARENT & | addArgWithFlagOnly (Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add argument with flag only.
|
|
template<typename NAME > |
PARENT & | addArgWithNameOnly (NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add argument with name only.
|
|
template<typename NAME > |
PARENT & | addMultiArg (Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add multi argument.
|
|
PARENT & | addMultiArgWithFlagOnly (Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add multi argument with flag only.
|
|
template<typename NAME > |
PARENT & | addMultiArgWithNameOnly (NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add multi argument with name only.
|
|
template<typename NAME > |
PARENT & | addMultiArgWithDefaulValues (Char flag, NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String()) |
| Add multi argument.
|
|
PARENT & | addMultiArgWithFlagOnlyAndDefaultValues (Char flag, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String()) |
| Add multi argument with flag only.
|
|
template<typename NAME > |
PARENT & | addMultiArgWithNameOnlyAndDefaultValues (NAME &&name, bool isWithValue=false, bool isRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String()) |
| Add multi argument with name only.
|
|
template<typename NAME > |
API< PARENT, Command, ARGPTR, false > | addCommand (NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const String &defaultValue=String(), const String &valueSpecifier=String()) |
| Add Command.
|
|
template<typename NAME > |
API< PARENT, Command, ARGPTR, false > | addCommandWithDefaultValues (NAME &&name, ValueOptions opt=ValueOptions::NoValue, bool isSubCommandRequired=false, const String &desc=String(), const String &longDesc=String(), const StringList &defaultValues=StringList(), const String &valueSpecifier=String()) |
| Add Command.
|
|
CmdLine is class that holds all rguments and parse command line arguments in the correspondence with holded arguments.
Definition at line 121 of file cmd_line.hpp.