CCAFFEINE  0.8.8
Public Member Functions | Protected Member Functions | Protected Attributes
BaseParameter Class Reference

#include <BaseParameter.h>

Inheritance diagram for BaseParameter:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

This interface is DEPRECATED. Documentation for all parameter types: The toString function for all parameters converts the fields of the parameter to a single string which is a & separated list. The fields of this list are: <type> <name> <current value>=""> <help> <prompt> (which is often no more than a parameter name) <Default> (value to be assigned by the UI if no input received -- as the current value may simply be uninitialized.) [additional fields]

The additional depends on the type.

For numeric types (INT,LONG,FLOAT,DOUBLE) we have <low> <high>

For STRING types we have Nchoices=

choice 1> ... <choice len-1> (If len = 0, any string is allowed)

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.


Member Function Documentation

virtual char* BaseParameter::toString ( ) [pure virtual]

Get the bounds, etc as a curiously formatted string

Implemented in StringParameter, BoolParameter, IntParameter, LongParameter, DoubleParameter, and FloatParameter.

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 StringParameter, BoolParameter, IntParameter, LongParameter, FloatParameter, and DoubleParameter.

virtual int BaseParameter::setValue ( char *  value) [pure virtual]

parse the ascii form of the value. returns 0 if ok, -1 if error.

Implemented in StringParameter, IntParameter, LongParameter, DoubleParameter, FloatParameter, and BoolParameter.

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 StringParameter, IntParameter, LongParameter, BoolParameter, FloatParameter, and DoubleParameter.

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 StringParameter, BoolParameter, IntParameter, LongParameter, DoubleParameter, and FloatParameter.

char* BaseParameter::fillString ( char *  s) [protected]

Expand s by the address of this and returns as a newly malloced string.


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