43 #ifndef CCXX_CMDOPTNS_H_
44 #define CCXX_CMDOPTNS_H_
46 #ifndef CCXX_STRING_H_
50 #ifdef CCXX_NAMESPACES
156 const char * inOptionName,
157 const char * inOptionLetter,
158 const char * inDescription,
160 bool inRequired =
false,
206 virtual bool hasValue();
239 const char * inOptionName,
240 const char * inOptionLetter,
241 const char * inDescription,
243 bool inRequired =
false,
251 virtual bool hasValue();
271 const char * inOptionName,
272 const char * inOptionLetter,
273 const char * inDescription,
274 bool inRequired =
false,
306 const char * inOptionName,
307 const char * inOptionLetter,
308 const char * inDescription,
309 bool inRequired =
false,
336 const char * inOptionName,
337 const char * inOptionLetter,
338 const char * inDescription,
339 bool inRequired =
false,
367 const char * inOptionName,
368 const char * inOptionLetter,
369 const char * inDescription,
370 bool inRequired =
false,
401 virtual bool argsHaveError() = 0;
406 virtual const char * printErrors() = 0;
411 virtual const char * printUsage() = 0;
417 virtual void registerError(
const char * errMsg ) = 0;
423 virtual void performTask() = 0;
438 const char * comment,
442 #ifdef CCXX_NAMESPACES
bool required
True if this parameter is required.
const char ** values
Array of list of values collected for this option.
Class for options with an argument e.g.
Derived class of CommandOption for options that have a value associated with them.
Common C++ generic string class.
This option is a flag only.
OptionType
OptionType is for denoting what type of option this is, with an arg, without an arg or the trailing a...
It only makes sense to have a single one of these set and it is exclusive with CommandOptionCollect.
CommandOption * next
This next CommandOption in this list of options or nil if no more options exist.
OptionType optionType
This command option's OptionType.
Remaining of the command line arguments.
CommandOption is the base class for all command line options.
This option is associated with a value.
int numValue
Number of values in the values array.
const char * optionLetter
option letter, these will be preceded with "-" on the command line.
It only makes sense to have a single one of these set and it is also exclusive with CommandOptionRest...
const char * optionName
Long option name, these will be preceded with "--" on the command line.
int numSet
The number of times this value has been set.
This is the CommandOptionParse interface class.
CommandOption type for flags.
__EXPORT CommandOption * defaultCommandOptionList
This defines a linked list head pointer for all the command line options that use the default list...
__EXPORT CommandOptionParse * makeCommandOptionParse(int argc, char **argv, const char *comment, CommandOption *options=defaultCommandOptionList)
makeCommandOptionParse will create an implementation of a CommandOptionParse object.
const char * description
A short description of the option for Usage messages.