ML Reference
ml::FloatField Class Reference

Field to encapsulate a float value. More...

#include <mlFields.h>

Inheritance diagram for ml::FloatField:
ml::Field ml::ProgressField

List of all members.

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.

Detailed Description

Field to encapsulate a float value.

Definition at line 481 of file mlFields.h.


Constructor & Destructor Documentation

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 
)

Member Function Documentation

void ml::FloatField::_initialize ( const std::string &  name = "",
float *  valuePtr = NULL 
) [protected]

Initializes this field.

float ml::FloatField::getFloatMaxValue ( ) const
Deprecated:
Do not use it.
float ml::FloatField::getFloatMinValue ( ) const
Deprecated:
Do not use it.
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)
Deprecated:
Do not use it.
void ml::FloatField::setFloatMinValue ( float  minValue)
Deprecated:
Do not use it.
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]

Reimplementation from Field which copies the field value more efficiently..

Reimplemented from ml::Field.


Member Data Documentation

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]

Maximum float value which can be set.

Deprecated:

Definition at line 528 of file mlFields.h.

float ml::FloatField::_minValue [protected]

Minimum float value which can be set.

Deprecated:

Definition at line 525 of file mlFields.h.

float* ml::FloatField::_valuePtr [protected]

Points to the variable containing the field value.

Definition at line 518 of file mlFields.h.


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