CommandOptionOneOf Class Reference
[Command-Line Options]

#include <CommandOption.hpp>

Inheritance diagram for CommandOptionOneOf:

Inheritance graph
[legend]
Collaboration diagram for CommandOptionOneOf:

Collaboration graph
[legend]
List of all members.

Detailed Description

This is a special "command option" which is really a meta-option to make sure at least one of a set of real options has been used.

Warning:
There's nothing to prevent you from, say, adding another meta-option to the list of mutually exclusive options contained in a CommandOptionOneOf instance (or even itself), but the behavior if you try this is undefined.

Definition at line 438 of file CommandOption.hpp.

Public Member Functions

 CommandOptionOneOf ()
 CommandOptionOneOf contructor.
virtual ~CommandOptionOneOf ()
 Destructor.
virtual std::string checkArguments ()
 If you specified a format for the arguments (for example, digit or string), this function checks them to see if they match.
void addOption (CommandOption *opt)
 Add an option to the list of mutually exclusive options.
CommandOptionwhichOne () const
 the command option that was used (NULL if none).

Protected Attributes

CommandOptionVec optionVec


Constructor & Destructor Documentation

CommandOptionOneOf  )  [inline]
 

CommandOptionOneOf contructor.

This sets the CommandOptionType for this object to metaType.

Definition at line 445 of file CommandOption.hpp.

virtual ~CommandOptionOneOf  )  [inline, virtual]
 

Destructor.

Definition at line 450 of file CommandOption.hpp.


Member Function Documentation

void addOption CommandOption opt  )  [inline]
 

Add an option to the list of mutually exclusive options.

Definition at line 455 of file CommandOption.hpp.

string checkArguments  )  [virtual]
 

If you specified a format for the arguments (for example, digit or string), this function checks them to see if they match.

If they don't, an error string is returned. If they do, an empty string is returned.

Parameters:
optVec complete set of processed command line options being processed (used by some option types).

Reimplemented from CommandOption.

Reimplemented in CommandOptionAllOf, CommandOptionMutex, and CommandOptionGroupOr.

Definition at line 269 of file CommandOption.cpp.

References CommandOption::getOptionString(), and CommandOptionOneOf::optionVec.

CommandOption * whichOne  )  const
 

the command option that was used (NULL if none).

Definition at line 291 of file CommandOption.cpp.

References CommandOptionOneOf::optionVec.


Member Data Documentation

CommandOptionVec optionVec [protected]
 

Definition at line 462 of file CommandOption.hpp.

Referenced by CommandOptionOneOf::checkArguments(), and CommandOptionOneOf::whichOne().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 03:31:34 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1