CCAFFEINE
0.8.8
|
#include <StringParameter.h>
Public Member Functions | |
StringParameter (char *name_, char *help_, char *prompt_, char *Default_) | |
int | setValue (char *val) |
void | addChoice (char *s) |
std::vector< ::std::string > | getChoices () |
char * | toString () |
virtual char * | toString (char *infix) |
char * | getName () |
char * | getValueString () |
Public Attributes | |
char * | Default |
char * | help |
char * | prompt |
char * | value |
Private Attributes | |
std::vector< ::std::string > | stringlist |
This interface is DEPRECATED. User must pick one of the Strings in choices, unless choices is empty. If no input, value is the empty (not NULL) String.
StringParameter::StringParameter | ( | char * | name_, |
char * | help_, | ||
char * | prompt_, | ||
char * | Default_ | ||
) |
Strings input in these functions will be copied, so the caller remains responsible for the memory deallocation of inputs.
int StringParameter::setValue | ( | char * | value | ) | [virtual] |
parse the ascii form of the value. returns 0 if ok, -1 if error.
Implements BaseParameter.
char* StringParameter::toString | ( | ) | [virtual] |
Get the bounds, etc as a curiously formatted string
Implements BaseParameter.
virtual char* StringParameter::toString | ( | char * | infix | ) | [virtual] |
Return the string form of the parameter using infix as part of the formatting. We own this string.
Implements BaseParameter.
char* StringParameter::getName | ( | ) | [inline, 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.
Implements BaseParameter.
{ return name; }
char* StringParameter::getValueString | ( | ) | [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".
Implements BaseParameter.
std::vector< ::std::string > StringParameter::stringlist [private] |
list of choices
char* StringParameter::Default |
these pointers are owned by this object and should not be freed/replaced by clients. READ_ONLY
char* StringParameter::help |
READ_ONLY
char* StringParameter::prompt |
READ_ONLY
char* StringParameter::value |
READ_ONLY