Loading...
Searching...
No Matches
IntParameter Class Reference
Inheritance diagram for IntParameter:
[legend]
Collaboration diagram for IntParameter:
[legend]

## Public Member Functions

| IntParameter (char c, const char *desc, int &v)
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 | addParamsToString (String &params)
void | SetWarningBuffer (String &buffer)
void | warning (const char *format,...)

## Protected Member Functions

virtual void | Translate (const char *value)
virtual bool | TranslateExtras (const char *value, const char *extras)

## 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)
Protected Attributes inherited from Parameter
char | ch
char * | description
void * | var
String * | warnings
bool | myNoPhoneHome
String | myVersion
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 93 of file Parameters.h.

## Constructor & Destructor Documentation

## IntParameter()

IntParameter::IntParameter | ( | char | c,
|  | const char * | desc,
|  | int & | v )

inline

Definition at line 96 of file Parameters.h.

: Parameter(c, desc, &v)
{}

## Member Function Documentation

## Status()

void IntParameter::Status | ( |  | ) |

virtual

Implements Parameter.

Definition at line 99 of file Parameters.cpp.

{
fprintf(stderr, "%*s : %*d (-%c9999)\n", nameCol, description,
statusCol, *(int *) var, ch);
}

## Translate()

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

protected virtual

Implements Parameter.

Definition at line 84 of file Parameters.cpp.

{
*(int *) var = atoi(value);
}

## TranslateExtras()

bool IntParameter::TranslateExtras | ( | const char * | value,
|  | const char * | extras )

protected virtual

Reimplemented from Parameter.

Definition at line 89 of file Parameters.cpp.

{
if (value[0] != 0 || !CheckInteger(extras))
return false;
Translate(extras);
return true;
}

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

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