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

OptionInt Class Reference

An OptionInt matches an integer in the command line. More...

#include <command_line_parsing.h>

Inheritance diagram for OptionInt:

Option List of all members.

Public Methods

 OptionInt ( String arguments = String("int"), int* storage_for_integer = 0 )
 Construct with a name for this option and a location to hold an int.

virtual ~OptionInt ()
virtual IntValueClassget_int ( int number = 0 )
virtual IntValueClassget_int ( ValueClass* value, Option* context ) const
virtual bool parse ( TokenStream* tokens, bool &changed, ValueClass* parent = 0 )
 returns true if the token stream parsing does not fail at this option. More...


Detailed Description

An OptionInt matches an integer in the command line.


Constructor & Destructor Documentation

OptionInt::OptionInt ( String arguments = String("int"),
int * storage_for_integer = 0)

Construct with a name for this option and a location to hold an int.

OptionInt::~OptionInt () [virtual]


Member Function Documentation

IntValueClass * OptionInt::get_int ( ValueClass * value,
Option * context) const [virtual]

IntValueClass * OptionInt::get_int ( int number = 0) [virtual]

bool OptionInt::parse ( TokenStream * tokens,
bool & changed,
ValueClass * parent = 0) [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.


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