ML Reference
ml::BoolField Class Reference

Field to encapsulate a boolean value. More...

#include <mlFields.h>

Inheritance diagram for ml::BoolField:
ml::Field

List of all members.

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 updateBoolValue (bool boolValue)
 Sets the field value to boolValue, but only touch field if the new value is different from the old value.
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.

Detailed Description

Field to encapsulate a boolean value.

Definition at line 63 of file mlFields.h.


Constructor & Destructor Documentation

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 
)

Member Function Documentation

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]

Reimplementation from Field which copies the field value more efficiently.

Reimplemented from ml::Field.

void ml::BoolField::switch_Value ( ) [inline]
Deprecated:
Use toggleValue() instead.

Definition at line 125 of file mlFields.h.

void ml::BoolField::toggleValue ( )

Toggles the Boolean field value.

void ml::BoolField::updateBoolValue ( bool  boolValue)

Sets the field value to boolValue, but only touch field if the new value is different from the old value.


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