ml::BoolField Class Reference
[Fields]

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 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 ()
Deprecated
 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 121 of file mlFields.h.

void ml::BoolField::toggleValue (  ) 

Toggles the Boolean field value.


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

Generated on Sat Sep 3 18:37:45 2011 for MLReference by  doxygen 1.5.8