GNU CommonC++
Public Member Functions | Public Attributes | List of all members
ost::CommandOptionNoArg Class Reference

CommandOption type for flags. More...

#include <cmdoptns.h>

Inheritance diagram for ost::CommandOptionNoArg:
ost::CommandOption

Public Member Functions

 CommandOptionNoArg (const char *inOptionName, const char *inOptionLetter, const char *inDescription, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList)
 CommandOptionArg contructor. More...
 
virtual void foundOption (CommandOptionParse *cop, const char *value=0)
 CommandOptionNoArg::foundOption will evpect a nil "value" passed in. More...
 
- Public Member Functions inherited from ost::CommandOption
virtual ~CommandOption ()
 A virtual destructor just in case. More...
 
 CommandOption (const char *inOptionName, const char *inOptionLetter, const char *inDescription, OptionType inOptionType, bool inRequired=false, CommandOption **ppNext=&defaultCommandOptionList)
 CommandOption contructor. More...
 
virtual void foundOption (CommandOptionParse *cop, const char **value, int num)
 foundOption is called by the CommandOptionParse object during the parsing of the command line options. More...
 
virtual void parseDone (CommandOptionParse *cop)
 Once parsing of command line options is complete, this method is called. More...
 
virtual void performTask (CommandOptionParse *cop)
 Once CommandOption objects have completed parsing and there are no errors they may have some specific tasks to perform. More...
 
virtual bool hasValue ()
 For fields with the required flag set, this method is used to determine if the Option has satisfied it's required status. More...
 

Public Attributes

int numSet
 The number of times this value has been set. More...
 
- Public Attributes inherited from ost::CommandOption
const char * optionName
 Long option name, these will be preceded with "--" on the command line. More...
 
const char * optionLetter
 option letter, these will be preceded with "-" on the command line. More...
 
const char * description
 A short description of the option for Usage messages. More...
 
OptionType optionType
 This command option's OptionType. More...
 
bool required
 True if this parameter is required. More...
 
CommandOptionnext
 This next CommandOption in this list of options or nil if no more options exist. More...
 

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...
 

Detailed Description

CommandOption type for flags.

Examples:
cmdlineopt.cpp.

Constructor & Destructor Documentation

ost::CommandOptionNoArg::CommandOptionNoArg ( 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 NoArg.

Parameters
inOptionNamelong option name
inOptionLettershort letter name
inDescriptionshort description of the option
inRequiredtrue if option is required
ppNextthe linked list header

Member Function Documentation

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

CommandOptionNoArg::foundOption will evpect a nil "value" passed in.

Reimplemented from ost::CommandOption.

Member Data Documentation

int ost::CommandOptionNoArg::numSet

The number of times this value has been set.


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