Public Member Functions | |
BooleanValue () | |
BooleanValue (const BooleanValue &Val) | |
BooleanValue (const bool &POD) | |
Value & | operator= (const Value &Other) |
operator bool () const | |
virtual | ~BooleanValue () |
Type | getType () const |
Value * | clone () const |
bool & | get () |
const bool & | get () const |
void | set (const bool &Val) |
void | writeToStream (std::ostream &OutStm) const |
BooleanValue is a container for a true/false value.
Example : declaration
// declaration of a BooleanValue, initialized to false by default openfluid::core::BooleanValue Val1; // declaration of a BooleanValue, initialized to true openfluid::core::BooleanValue Val2(true);
Example : getting the contained value
bool Tmp1; // using the get method Tmp1 = Val1.get(); // or using the cast operator Tmp1 = Val1;
Example : setting the contained value
// using the set method Val1.set(true);
Example : conversion from string
openfluid::core::StringValue StringVal("true"); // to BooleanValue Val1 = StringVal.toBooleanValue(); // to bool bool BoolVal = StringVal.toBoolean();
Example : conversion to string
std::string StdStrVal = Val1.toString();
openfluid::core::BooleanValue::BooleanValue | ( | ) | [inline] |
Default constructor
openfluid::core::BooleanValue::BooleanValue | ( | const BooleanValue & | Val | ) | [inline] |
Copy constructor
openfluid::core::BooleanValue::BooleanValue | ( | const bool & | POD | ) | [inline] |
Constructor from plain old type
virtual openfluid::core::BooleanValue::~BooleanValue | ( | ) | [inline, virtual] |
Value* openfluid::core::BooleanValue::clone | ( | ) | const [inline, virtual] |
Reimplemented from openfluid::core::Value.
bool& openfluid::core::BooleanValue::get | ( | ) | [inline] |
Returns the boolean value as plain old type
const bool& openfluid::core::BooleanValue::get | ( | ) | const [inline] |
Returns the boolean value as a const plain old type
Type openfluid::core::BooleanValue::getType | ( | ) | const [inline, virtual] |
Implements openfluid::core::Value.
openfluid::core::BooleanValue::operator bool | ( | ) | const [inline] |
Cast operator
Assignment operator
Reimplemented from openfluid::core::Value.
void openfluid::core::BooleanValue::set | ( | const bool & | Val | ) | [inline] |
Sets the plain old type boolean value
[in] | Val | the boolean value |
void openfluid::core::BooleanValue::writeToStream | ( | std::ostream & | OutStm | ) | const [virtual] |
Implements openfluid::core::Value.