|
virtual void | Translate (const char *value) |
|
virtual void | Translate (const char *value)=0 |
|
virtual bool | TranslateExtras (const char *value, const char *extras) |
|
Definition at line 210 of file Parameters.h.
◆ ListParameter()
ListParameter::ListParameter |
( |
char |
c, |
|
|
const char * |
desc, |
|
|
int & |
v, |
|
|
OptionList * |
opt |
|
) |
| |
Definition at line 224 of file Parameters.cpp.
226{
227 options = opt;
228
229 for (
OptionList * l = options; l->ch != 0; l++)
230 {
231 key += l->ch;
232 key += '|';
233 }
234
235 key.SetLength(key.Length() - 1);
236}
◆ Status()
void ListParameter::Status |
( |
| ) |
|
|
virtual |
Implements Parameter.
Definition at line 197 of file Parameters.cpp.
198{
200
201 for (l = options; l->ch != 0; l++)
202 if (l->code == *((int *)var))
203 break;
204
205 fprintf(stderr, "%*s : %*s (-%c[%s])\n", nameCol, description,
206 statusCol, l->description, ch, (const char *) key);
207}
◆ Translate()
void ListParameter::Translate |
( |
const char * |
value | ) |
|
|
protectedvirtual |
Implements Parameter.
Definition at line 209 of file Parameters.cpp.
210{
212
213 for (l = options; l->ch != 0; l++)
214 if (tolower(l->ch) == tolower(value[0]))
215 break;
216
217 if (l->ch == 0 && tolower(value[0]) != 0)
218 warning("Command line parameter -%c%s: the option '%c' has no meaning\n",
219 ch, value, value[0], (const char *) key);
220
221 *((int*) var) = l->code;
222}
◆ key
◆ options
The documentation for this class was generated from the following files: