Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

StringOption Class Reference

#include <support.hh>

Inherits BaseOption.

List of all members.


Detailed Description

String-valued option.

Definition at line 94 of file support.hh.


Public Member Functions

 StringOption (const char *o, const char *e, int v=0)
 Initialize for option o and explanation e and default value v.
void value (int v)
 Set default value to v.
int value (void) const
 Return current option value.
void add (int v, const char *o, const char *h=NULL)
 Add option value for value v, string o, and help text h.
virtual bool parse (int &argc, char *argv[])
 Parse option at first position.
virtual void help (void)
 Print help text.
virtual ~StringOption (void)
 Destructor.

Protected Attributes

int cur
 Current value.
Valuefst
 First option value.
Valuelst
 Last option value.

Classes

class  Value
 Option value. More...

Constructor & Destructor Documentation

StringOption::StringOption ( const char *  o,
const char *  e,
int  v = 0 
) [inline]

Initialize for option o and explanation e and default value v.

Definition at line 56 of file options.icc.

StringOption::~StringOption ( void   )  [virtual]

Destructor.

Definition at line 105 of file options.cc.


Member Function Documentation

void StringOption::value ( int  v  )  [inline]

Set default value to v.

Definition at line 59 of file options.icc.

int StringOption::value ( void   )  const [inline]

Return current option value.

Definition at line 63 of file options.icc.

void StringOption::add ( int  v,
const char *  o,
const char *  h = NULL 
)

Add option value for value v, string o, and help text h.

Definition at line 48 of file options.cc.

bool StringOption::parse ( int &  argc,
char *  argv[] 
) [virtual]

Parse option at first position.

Implements BaseOption.

Definition at line 63 of file options.cc.

void StringOption::help ( void   )  [virtual]

Print help text.

Implements BaseOption.

Definition at line 86 of file options.cc.


Member Data Documentation

int StringOption::cur [protected]

Current value.

Definition at line 104 of file support.hh.

Value* StringOption::fst [protected]

First option value.

Definition at line 105 of file support.hh.

Value* StringOption::lst [protected]

Last option value.

Definition at line 106 of file support.hh.


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