GNU CommonC++
Public Member Functions | Public Attributes

ost::CommandOptionWithArg Class Reference

Derived class of CommandOption for options that have a value associated with them. More...

#include <cmdoptns.h>

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

List of all members.

Public Member Functions

 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 Attributes

const char ** values
 Array of list of values collected for this option.
int numValue
 Number of values in the values array.

Detailed Description

Derived class of CommandOption for options that have a value associated with them.

Classes CommandOptionRest and CommandOptionArg derive from this class.


Constructor & Destructor Documentation

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

CommandOptionWithArg contructor.

Note the default values for required and ppNext.

Parameters:
inOptionNamelong option name
inOptionLettershort letter name
inDescriptionshort description of the option
inOptionTypethe type of this option
inRequiredtrue if option is required
ppNextthe linked list header
virtual ost::CommandOptionWithArg::~CommandOptionWithArg ( ) [virtual]

Member Function Documentation

virtual void ost::CommandOptionWithArg::foundOption ( CommandOptionParse cop,
const char *  value = 0 
) [virtual]

Reimplemented from ost::CommandOption.

virtual void ost::CommandOptionWithArg::foundOption ( CommandOptionParse cop,
const char **  value,
int  num 
) [virtual]

Reimplemented from ost::CommandOption.

virtual bool ost::CommandOptionWithArg::hasValue ( ) [virtual]

Reimplemented from ost::CommandOption.


Member Data Documentation

Number of values in the values array.

Array of list of values collected for this option.


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