#include <BaseParameter.h>
Public Member Functions | |
virtual char * | toString ()=0 |
virtual char * | getName ()=0 |
virtual int | setValue (char *value)=0 |
virtual char * | getValueString ()=0 |
virtual char * | toString (char *infix)=0 |
Protected Member Functions | |
char * | fillString (char *s) |
Protected Attributes | |
char * | name |
char * | valueString |
The additional depends on the type.
For numeric types (INT,LONG,FLOAT,DOUBLE) we have <low> <high>
For STRING types we have Nchoices=
For BOOL types we have no optional fields.
BUGS: :&@ are considered special by some downstream users of these parameters in stringified form. The user is not prevented from entering these characters in choiceless STRING values. Development of a suitable escaping convention is desirable.
virtual char* BaseParameter::toString | ( | ) | [pure virtual] |
Get the bounds, etc as a curiously formatted string
Implemented in BoolParameter, DoubleParameter, FloatParameter, IntParameter, LongParameter, and StringParameter.
virtual char* BaseParameter::getName | ( | ) | [pure virtual] |
Return the simple string (no whitespace) name/key identifying this parameter uniquely within a collection of parameters. We own this string; don't free it.
Implemented in BoolParameter, DoubleParameter, FloatParameter, IntParameter, LongParameter, and StringParameter.
virtual int BaseParameter::setValue | ( | char * | value | ) | [pure virtual] |
parse the ascii form of the value. returns 0 if ok, -1 if error.
Implemented in BoolParameter, DoubleParameter, FloatParameter, IntParameter, LongParameter, and StringParameter.
virtual char* BaseParameter::getValueString | ( | ) | [pure virtual] |
Get value printed into a string in the usual way. We own this string; don't free it (or keep it beyond the life of the parameter object). In some obscure cases, this may come back as "UNDEFINED".
Implemented in BoolParameter, DoubleParameter, FloatParameter, IntParameter, LongParameter, and StringParameter.
virtual char* BaseParameter::toString | ( | char * | infix | ) | [pure virtual] |
Return the string form of the parameter using infix as part of the formatting. We own this string.
Implemented in BoolParameter, DoubleParameter, FloatParameter, IntParameter, LongParameter, and StringParameter.
char* BaseParameter::fillString | ( | char * | s | ) | [protected] |
Expand s by the address of this and returns as a newly malloced string.