|
Public Types |
| enum | Args { NO_ARGS,
ONE_ARG,
AT_LEAST_ONE_ARG,
MANY_ARGS
} |
| | Enumeration to specify how many arguments this option can take. More...
|
Public Member Functions |
| | Option () |
| | Option (const Option &) |
| Option & | operator= (const Option &) |
| | Option (const char *const option, const bool hasArg, const char *const description) |
| | Construct an option from the given parameters.
|
| | Option (const char *const option, const Args takesArgs, const char *const description) |
| | Construct an option from the given parameters.
|
| | Option (const char *const option, const char *const description) |
| | Construct an option from the given parameters.
|
| | Option (const char *const option, const char *const longOption, const bool hasArg, const char *const description) |
| | Construct an option from the given parameters.
|
| | Option (const char *const option, const char *const longOption, const Args takesArgs, const char *const description) |
| | Construct an option from the given parameters.
|
| | ~Option () |
| std::string | getArgName () const |
| | Provide the display name used for the argument to this option.
|
| std::string | getOpt () const |
| | Return a copy of the short option.
|
| std::string | getLongOpt () const |
| | Return a copy of the long option.
|
| bool | hasLongOpt () const |
| | Report whether the option has a long option.
|
| std::string | getDescription () const |
| | Return the description for this option as would be presented in a help screen.
|
| int | getId () const |
| | Returns an identifier for this option.
|
| std::string | getValue () const |
| | Get the value for this option.
|
| std::string | getValue (const char *const defaultValue) const |
| | Get the value for this option.
|
| std::string | getValue (const unsigned index) const |
| | Get an argument value for this option at the given index location.
|
| std::vector< std::string > | getValues () const |
| bool | hasArgName () const |
| | Report whether the arg name value for this option was set.
|
| bool | hasArg () const |
| bool | hasArgs () const |
| void | setArgName (const std::string &argName) |
| | Set the argument name used by this option as used in help screens.
|
| void | setArgs (const Args takesArgs) |
| | Specify how many arguments this option can take.
|
| void | addValue (const std::string &value) |
| | Add a value to this option.
|