ML Reference
|
Field to encapsulate a boolean value. More...
#include <mlFields.h>
Public Member Functions | |
BoolField () | |
Default constructor, do not use it. | |
BoolField (const std::string &name) | |
Constructor, creates a field with a name to manage a Boolean value. | |
void | setStringValue (const std::string &value) |
Sets the value of the field to value . | |
void | setBoolValue (bool boolValue) |
Sets the field value to boolValue . | |
void | toggleValue () |
Toggles the Boolean field value. | |
std::string | getStringValue () const |
Returns the value of the field as string value. | |
bool | getBoolValue () const |
Returns the value of the field as a Boolean. | |
bool | isOn () const |
Returns the value of the field as Boolean. | |
Deprecated | |
void | switch_Value () |
BoolField (const std::string &name, bool *valuePtr) | |
Protected Member Functions | |
virtual void | setValueFromField (const Field &field) |
Reimplementation from Field which copies the field value more efficiently. |
Field to encapsulate a boolean value.
Definition at line 63 of file mlFields.h.
ml::BoolField::BoolField | ( | ) |
Default constructor, do not use it.
ml::BoolField::BoolField | ( | const std::string & | name | ) |
Constructor, creates a field with a name
to manage a Boolean value.
Default value is false.
ml::BoolField::BoolField | ( | const std::string & | name, |
bool * | valuePtr | ||
) |
bool ml::BoolField::getBoolValue | ( | ) | const |
Returns the value of the field as a Boolean.
std::string ml::BoolField::getStringValue | ( | ) | const [virtual] |
Returns the value of the field as string value.
Implements ml::Field.
bool ml::BoolField::isOn | ( | ) | const |
Returns the value of the field as Boolean.
void ml::BoolField::setBoolValue | ( | bool | boolValue | ) |
Sets the field value to boolValue
.
void ml::BoolField::setStringValue | ( | const std::string & | value | ) | [virtual] |
Sets the value of the field to value
.
Implements ml::Field.
virtual void ml::BoolField::setValueFromField | ( | const Field & | field | ) | [protected, virtual] |
void ml::BoolField::switch_Value | ( | ) | [inline] |
Definition at line 121 of file mlFields.h.
void ml::BoolField::toggleValue | ( | ) |
Toggles the Boolean field value.