All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
openfluid::core::BooleanValue Class Reference

#include <core/BooleanValue.hpp>

Inheritance diagram for openfluid::core::BooleanValue:
openfluid::core::SimpleValue openfluid::core::Value

Public Member Functions

 BooleanValue ()
 
 BooleanValue (const BooleanValue &Val)
 
 BooleanValue (const bool &POD)
 
Valueoperator= (const Value &Other)
 
 operator bool () const
 
virtual ~BooleanValue ()
 
Type getType () const
 
Valueclone () const
 
bool & get ()
 
const bool & get () const
 
void set (const bool &Val)
 
void writeToStream (std::ostream &OutStm) const
 
- Public Member Functions inherited from openfluid::core::SimpleValue
bool isSimple () const
 
bool isCompound () const
 
- Public Member Functions inherited from openfluid::core::Value
 Value ()
 
 Value (const Value &)
 
virtual ~Value ()
 
bool isDoubleValue () const
 
const DoubleValueasDoubleValue () const
 
DoubleValueasDoubleValue ()
 
bool isIntegerValue () const
 
const IntegerValueasIntegerValue () const
 
IntegerValueasIntegerValue ()
 
bool isBooleanValue () const
 
const BooleanValueasBooleanValue () const
 
BooleanValueasBooleanValue ()
 
bool isStringValue () const
 
const StringValueasStringValue () const
 
StringValueasStringValue ()
 
bool isNullValue () const
 
const NullValueasNullValue () const
 
NullValueasNullValue ()
 
bool isVectorValue () const
 
const VectorValueasVectorValue () const
 
VectorValueasVectorValue ()
 
bool isMatrixValue () const
 
const MatrixValueasMatrixValue () const
 
MatrixValueasMatrixValue ()
 
bool isMapValue () const
 
const MapValueasMapValue () const
 
MapValueasMapValue ()
 
std::string toString () const
 

Additional Inherited Members

- Public Types inherited from openfluid::core::Value
enum  Type {
  NONE, BOOLEAN, INTEGER, DOUBLE,
  STRING, VECTOR, MATRIX, MAP,
  NULLL
}
 
- Static Public Member Functions inherited from openfluid::core::Value
static bool getValueTypeFromString (const std::string ValueTypeString, Value::Type &ValueType)
 
static std::string getStringFromValueType (const Value::Type ValueType)
 

Detailed Description

BooleanValue is a container for a true/false value.

See Also
Value


Example : declaration

// declaration of a BooleanValue, initialized to false by default
// declaration of a BooleanValue, initialized to 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();

Constructor & Destructor Documentation

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 ( )
inlinevirtual

Member Function Documentation

Value* openfluid::core::BooleanValue::clone ( ) const
inlinevirtual

Reimplemented from openfluid::core::Value.

bool& openfluid::core::BooleanValue::get ( )
inline

Returns the boolean value as plain old type

Returns
the boolean value
const bool& openfluid::core::BooleanValue::get ( ) const
inline

Returns the boolean value as a const plain old type

Returns
the boolean value
Type openfluid::core::BooleanValue::getType ( ) const
inlinevirtual
openfluid::core::BooleanValue::operator bool ( ) const
inline

Cast operator

Value& openfluid::core::BooleanValue::operator= ( const Value )
virtual

Assignment operator

Reimplemented from openfluid::core::Value.

void openfluid::core::BooleanValue::set ( const bool &  Val)
inline

Sets the plain old type boolean value

Parameters
[in]Valthe boolean value
void openfluid::core::BooleanValue::writeToStream ( std::ostream &  OutStm) const
virtual

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