ML Reference
|
Field to encapsulate a float value. More...
#include <mlFields.h>
Public Member Functions | |
FloatField () | |
Default constructor, do not use it. | |
FloatField (const std::string &name) | |
Constructor, create a field with a name to manage a float value, with 0 as a default value. | |
void | setStringValue (const std::string &stringValue) |
Sets the value of the field to stringValue . | |
void | setFloatValue (float floatValue) |
Sets the field value to floatValue . | |
std::string | getStringValue () const |
Returns the value of the field as a string value. | |
float | getFloatValue () const |
Returns the value of the field. | |
Deprecated | |
void | setFloatMaxValue (float maxValue) |
float | getFloatMaxValue () const |
void | setFloatMinValue (float minValue) |
float | getFloatMinValue () const |
FloatField (const std::string &name, float *valuePtr) | |
Protected Member Functions | |
virtual void | setValueFromField (const Field &field) |
Reimplementation from Field which copies the field value more efficiently.. | |
void | _initialize (const std::string &name="", float *valuePtr=NULL) |
Initializes this field. | |
Protected Attributes | |
float * | _valuePtr |
Points to the variable containing the field value. | |
float | _internalValue |
Stores the float value (if no external deprecated reference was given). | |
float | _minValue |
Minimum float value which can be set. | |
float | _maxValue |
Maximum float value which can be set. |
Field to encapsulate a float value.
Definition at line 481 of file mlFields.h.
ml::FloatField::FloatField | ( | ) |
Default constructor, do not use it.
ml::FloatField::FloatField | ( | const std::string & | name | ) |
Constructor, create a field with a name
to manage a float value, with 0 as a default value.
ml::FloatField::FloatField | ( | const std::string & | name, |
float * | valuePtr | ||
) |
void ml::FloatField::_initialize | ( | const std::string & | name = "" , |
float * | valuePtr = NULL |
||
) | [protected] |
Initializes this field.
float ml::FloatField::getFloatMaxValue | ( | ) | const |
float ml::FloatField::getFloatMinValue | ( | ) | const |
float ml::FloatField::getFloatValue | ( | ) | const |
Returns the value of the field.
Referenced by ml::ProgressField::getProgressValue().
std::string ml::FloatField::getStringValue | ( | ) | const [virtual] |
Returns the value of the field as a string value.
setStringValue must be able to reinterpret this returned string correctly.
Implements ml::Field.
void ml::FloatField::setFloatMaxValue | ( | float | maxValue | ) |
void ml::FloatField::setFloatMinValue | ( | float | minValue | ) |
void ml::FloatField::setFloatValue | ( | float | floatValue | ) |
Sets the field value to floatValue
.
By default the entire float type range can be set.
Reimplemented in ml::ProgressField.
void ml::FloatField::setStringValue | ( | const std::string & | stringValue | ) | [virtual] |
Sets the value of the field to stringValue
.
Implements ml::Field.
virtual void ml::FloatField::setValueFromField | ( | const Field & | field | ) | [protected, virtual] |
float ml::FloatField::_internalValue [protected] |
Stores the float value (if no external deprecated reference was given).
Definition at line 521 of file mlFields.h.
float ml::FloatField::_maxValue [protected] |
float ml::FloatField::_minValue [protected] |
float* ml::FloatField::_valuePtr [protected] |
Points to the variable containing the field value.
Definition at line 518 of file mlFields.h.