Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

CommandOptionWithArg Class Reference

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

#include <cmdoptns.h>

Inheritance diagram for CommandOptionWithArg:

CommandOption CommandOptionArg CommandOptionCollect 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

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:
inOptionName long option name
inOptionLetter short letter name
inDescription short description of the option
inOptionType the type of this option
inRequired true if option is required
ppNext the linked list header

virtual CommandOptionWithArg::~CommandOptionWithArg  )  [virtual]
 


Member Function Documentation

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

Reimplemented from CommandOption.

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

Reimplemented from CommandOption.

virtual bool CommandOptionWithArg::hasValue  )  [virtual]
 

Reimplemented from CommandOption.


Member Data Documentation

int CommandOptionWithArg::numValue
 

Number of values in the values array.

Examples:
cmdlineopt.cpp.

const char** CommandOptionWithArg::values
 

Array of list of values collected for this option.

Examples:
cmdlineopt.cpp.


The documentation for this class was generated from the following file:
Generated on Tue Jan 18 14:32:37 2005 for GNU CommonC++ by  doxygen 1.3.9.1