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.
|
Value * | fst |
| First option value.
|
Value * | lst |
| 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] |
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] |
void StringOption::help |
( |
void |
|
) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: