|
GNU CommonC++
|
It only makes sense to have a single one of these set and it is also exclusive with CommandOptionRest. More...
#include <cmdoptns.h>
Public Member Functions | |
| CommandOptionCollect (const char *inOptionName, const char *inOptionLetter, const char *inDescription, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList) | |
| CommandOptionRest contructor. | |
Public Member Functions inherited from ost::CommandOptionWithArg | |
| CommandOptionWithArg (const char *inOptionName, const char *inOptionLetter, const char *inDescription, OptionType inOptionType, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList) | |
| CommandOptionWithArg contructor. | |
| virtual | ~CommandOptionWithArg () |
| virtual void | foundOption (CommandOptionParse *cop, const char *value=0) |
| virtual void | foundOption (CommandOptionParse *cop, const char **value, int num) |
| virtual bool | hasValue () |
Public Member Functions inherited from ost::CommandOption | |
| virtual | ~CommandOption () |
| A virtual destructor just in case. | |
| CommandOption (const char *inOptionName, const char *inOptionLetter, const char *inDescription, OptionType inOptionType, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList) | |
| CommandOption contructor. | |
| virtual void | parseDone (CommandOptionParse *cop) |
| Once parsing of command line options is complete, this method is called. | |
| virtual void | performTask (CommandOptionParse *cop) |
| Once CommandOption objects have completed parsing and there are no errors they may have some specific tasks to perform. | |
Additional Inherited Members | |
Public Types inherited from ost::CommandOption | |
| enum | OptionType { hasArg , noArg , trailing , collect } |
| OptionType is for denoting what type of option this is, with an arg, without an arg or the trailing args. More... | |
Public Attributes inherited from ost::CommandOptionWithArg | |
| const char ** | values |
| Array of list of values collected for this option. | |
| int | numValue |
| Number of values in the values array. | |
Public Attributes inherited from ost::CommandOption | |
| const char * | optionName |
| Long option name, these will be preceded with "--" on the command line. | |
| const char * | optionLetter |
| option letter, these will be preceded with "-" on the command line. | |
| const char * | description |
| A short description of the option for Usage messages. | |
| OptionType | optionType |
| This command option's OptionType. | |
| bool | required |
| True if this parameter is required. | |
| CommandOption * | next |
| This next CommandOption in this list of options or nil if no more options exist. | |
It only makes sense to have a single one of these set and it is also exclusive with CommandOptionRest.
This makes parameter collecting behave line the Unix "cat" command.
CommandOption to collect parameters that are not options.
| ost::CommandOptionCollect::CommandOptionCollect | ( | const char * | inOptionName, |
| const char * | inOptionLetter, | ||
| const char * | inDescription, | ||
| bool | inRequired = false, | ||
| CommandOption ** | ppNext = &defaultCommandOptionList ) |
CommandOptionRest contructor.
This sets the optionType for this object to Collect.
| inOptionName | long option name |
| inOptionLetter | short letter name |
| inDescription | short description of the option |
| inRequired | true if option is required |
| ppNext | the linked list header |