GNU CommonC++
Public Member Functions
ost::CommandOptionArg Class Reference

Class for options with an argument e.g. More...

#include <cmdoptns.h>

Inheritance diagram for ost::CommandOptionArg:
ost::CommandOptionWithArg ost::CommandOption

List of all members.

Public Member Functions

 CommandOptionArg (const char *inOptionName, const char *inOptionLetter, const char *inDescription, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList)
 CommandOptionArg contructor.
virtual ~CommandOptionArg ()
- 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 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.

Detailed Description

Class for options with an argument e.g.

–option value .

Examples:
cmdlineopt.cpp.

Constructor & Destructor Documentation

ost::CommandOptionArg::CommandOptionArg ( const char *  inOptionName,
const char *  inOptionLetter,
const char *  inDescription,
bool  inRequired = false,
CommandOption **  ppNext = &defaultCommandOptionList 
)

CommandOptionArg contructor.

This sets the optionType for this object to HasArg.

Parameters:
inOptionNamelong option name
inOptionLettershort letter name
inDescriptionshort description of the option
inRequiredtrue if option is required
ppNextthe linked list header
virtual ost::CommandOptionArg::~CommandOptionArg ( )
virtual

The documentation for this class was generated from the following file: