Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

OptionSelection Class Reference

An OptionSelection is a collection of sub-options. More...

#include <command_line_parsing.h>

Inheritance diagram for OptionSelection:

Option List of all members.

Public Methods

 OptionSelection ( bool allow_empty = false )
 OptionSelection ( Option *opt1, bool allow_empty )
 OptionSelection ( Option *opt1, Option *opt2, bool allow_empty )
virtual ~OptionSelection ()
virtual OptionSelection* add ( Option* )
virtual bool parse ( TokenStream* tokens, bool &changed, ValueClass* parent )
 returns true if the token stream parsing does not fail at this option. More...

virtual void delete_values ()
virtual void print ( String& command_line_string, suif_vector<OptionDescription>* descriptions ) const
 Prepare the printable description of this option. More...


Protected Attributes

bool _allow_empty
Options* sf_owned _selection_list


Detailed Description

An OptionSelection is a collection of sub-options.

It matches with one of the sub-options.


Constructor & Destructor Documentation

OptionSelection::OptionSelection ( bool allow_empty = false)

OptionSelection::OptionSelection ( Option * opt1,
bool allow_empty)

OptionSelection::OptionSelection ( Option * opt1,
Option * opt2,
bool allow_empty)

OptionSelection::~OptionSelection () [virtual]


Member Function Documentation

OptionSelection * OptionSelection::add ( Option * o) [virtual]

void OptionSelection::delete_values () [virtual]

Reimplemented from Option.

bool OptionSelection::parse ( TokenStream * tokens,
bool & changed,
ValueClass * parent) [virtual]

returns true if the token stream parsing does not fail at this option.

sets the changed parameter to true if the option parsing generated some state. The changed token is important in loops because OptionSelections can succeed without actually consuming any of the token stream.

Reimplemented from Option.

void OptionSelection::print ( String & command_line_string,
suif_vector<OptionDescription>* descriptions) const [virtual]

Prepare the printable description of this option.

Append a printed message to command_line_string, and a description to descriptions.

Reimplemented from Option.


Member Data Documentation

bool OptionSelection::_allow_empty [protected]

Options *sf_owned OptionSelection::_selection_list [protected]


The documentation for this class was generated from the following files:
Generated at Mon Jul 31 13:44:15 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000