ListParameter Class Reference
Inheritance diagram for ListParameter:
[legend]
Collaboration diagram for ListParameter:
[legend]

## Public Member Functions

| ListParameter (char c, const char *desc, int &v, OptionList *opt)
virtual void | Status ()
Public Member Functions inherited from Parameter
| Parameter (char c, const char *desc, void *v)
virtual bool | Read (int argc, char **argv, int argn)
virtual void | Status ()=0
virtual void | addParamsToString (String &params)
void | SetWarningBuffer (String &buffer)
void | warning (const char *format,...)

## Protected Member Functions

virtual void | Translate (const char *value)
Protected Member Functions inherited from Parameter
virtual void | Translate (const char *value)=0
virtual bool | TranslateExtras (const char *value, const char *extras)

## Protected Attributes

String | key
OptionList * | options
Protected Attributes inherited from Parameter
char | ch
char * | description
void * | var
String * | warnings
bool | myNoPhoneHome
String | myVersion

## Additional Inherited Members

Static Public Member Functions inherited from Parameter
static void | SetNameLen (int len)
static void | SetStatusLen (int len)
Static Protected Member Functions inherited from Parameter
static bool | CheckInteger (const char *value)
static bool | CheckDouble (const char *value)
Static Protected Attributes inherited from Parameter
static const char | PARAM_STR_SEP = ','
static int | nameCol = 30
static int | statusCol = 15

## Detailed Description

Definition at line 210 of file Parameters.h.

## Constructor & Destructor Documentation

## ListParameter()

ListParameter::ListParameter | ( | char | c,
|  | const char * | desc,
|  | int & | v,
|  | OptionList * | opt
| ) |  |

Definition at line 224 of file Parameters.cpp.

: Parameter(c, desc, &v)
{
options = opt;
for (OptionList * l = options; l->ch != 0; l++)
{
key += l->ch;
key += '|';
}
key.SetLength(key.Length() - 1);
}
Parameter
Definition: Parameters.h:30
OptionList
Definition: Parameters.h:201

## Member Function Documentation

## Status()

void ListParameter::Status | ( |  | ) |

virtual

Implements Parameter.

Definition at line 197 of file Parameters.cpp.

{
OptionList * l;
for (l = options; l->ch != 0; l++)
if (l->code == *((int *)var))
break;
fprintf(stderr, "%*s : %*s (-%c[%s])\n", nameCol, description,
statusCol, l->description, ch, (const char *) key);
}

## Translate()

void ListParameter::Translate | ( | const char * | value | ) |

protected virtual

Implements Parameter.

Definition at line 209 of file Parameters.cpp.

{
OptionList * l;
for (l = options; l->ch != 0; l++)
if (tolower(l->ch) == tolower(value[0]))
break;
if (l->ch == 0 && tolower(value[0]) != 0)
warning("Command line parameter -%c%s: the option '%c' has no meaning\n",
ch, value, value[0], (const char *) key);
*((int*) var) = l->code;
}

## Member Data Documentation

## key

String ListParameter::key

protected

Definition at line 218 of file Parameters.h.

## options

OptionList* ListParameter::options

protected

Definition at line 219 of file Parameters.h.

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

- general/Parameters.h
- general/Parameters.cpp