![]() |
#include <core/Value.hpp>
Public Types | |
enum | Type { NONE, BOOLEAN, INTEGER, DOUBLE, STRING, VECTOR, MATRIX, MAP, TREE, NULLL } |
Public Member Functions | |
Value () | |
virtual | ~Value () |
virtual Value & | operator= (const Value &) |
virtual Type | getType () const =0 |
virtual Value * | clone () const |
virtual bool | convert (Value &) const |
virtual bool | isSimple () const =0 |
virtual bool | isCompound () const =0 |
virtual void | writeToStream (std::ostream &OutStm) const =0 |
virtual void | writeQuotedToStream (std::ostream &OutStm) const =0 |
bool | isDoubleValue () const |
const DoubleValue & | asDoubleValue () const |
DoubleValue & | asDoubleValue () |
bool | isIntegerValue () const |
const IntegerValue & | asIntegerValue () const |
IntegerValue & | asIntegerValue () |
bool | isBooleanValue () const |
const BooleanValue & | asBooleanValue () const |
BooleanValue & | asBooleanValue () |
bool | isStringValue () const |
const StringValue & | asStringValue () const |
StringValue & | asStringValue () |
bool | isNullValue () const |
const NullValue & | asNullValue () const |
NullValue & | asNullValue () |
bool | isVectorValue () const |
const VectorValue & | asVectorValue () const |
VectorValue & | asVectorValue () |
bool | isMatrixValue () const |
const MatrixValue & | asMatrixValue () const |
MatrixValue & | asMatrixValue () |
bool | isMapValue () const |
const MapValue & | asMapValue () const |
MapValue & | asMapValue () |
bool | isTreeValue () const |
const TreeValue & | asTreeValue () const |
TreeValue & | asTreeValue () |
std::string | toString () const |
Static Public Member Functions | |
static bool | getValueTypeFromString (const std::string &ValueTypeString, Value::Type &ValueType) |
static std::string | getStringFromValueType (const Value::Type ValueType) |
Friends | |
std::ostream & | operator<< (std::ostream &OutStm, const Value &Val) |
|
inline |
|
inlinevirtual |
const BooleanValue& openfluid::core::Value::asBooleanValue | ( | ) | const |
Returns the value as a constant BooleanValue if the value is of the BooleanValue type
openfluid::base::FrameworkException | if the value is not of the BooleanValue type |
BooleanValue& openfluid::core::Value::asBooleanValue | ( | ) |
Returns the value as a BooleanValue if the value is of the BooleanValue type
openfluid::base::FrameworkException | if the value is not of the BooleanValue type |
const DoubleValue& openfluid::core::Value::asDoubleValue | ( | ) | const |
Returns the value as a constant DoubleValue if the value is of the DoubleValue type
openfluid::base::FrameworkException | if the value is not of the DoubleValue type |
DoubleValue& openfluid::core::Value::asDoubleValue | ( | ) |
Returns the value as a DoubleValue if the value is of the DoubleValue type
openfluid::base::FrameworkException | if the value is not of the DoubleValue type |
const IntegerValue& openfluid::core::Value::asIntegerValue | ( | ) | const |
Returns the value as a constant IntegerValue if the value is of the IntegerValue type
openfluid::base::FrameworkException | if the value is not of the IntegerValue type |
IntegerValue& openfluid::core::Value::asIntegerValue | ( | ) |
Returns the value as a IntegerValue if the value is of the IntegerValue type
openfluid::base::FrameworkException | if the value is not of the IntegerValue type |
const MapValue& openfluid::core::Value::asMapValue | ( | ) | const |
Returns the value as a constant MapValue if the value is of the MapValue type
openfluid::base::FrameworkException | if the value is not of the MapValue type |
MapValue& openfluid::core::Value::asMapValue | ( | ) |
Returns the value as a MapValue if the value is of the MapValue type
openfluid::base::FrameworkException | if the value is not of the MapValue type |
const MatrixValue& openfluid::core::Value::asMatrixValue | ( | ) | const |
Returns the value as a constant MatrixValue if the value is of the MatrixValue type
openfluid::base::FrameworkException | if the value is not of the MatrixValue type |
MatrixValue& openfluid::core::Value::asMatrixValue | ( | ) |
Returns the value as a MatrixValue if the value is of the MatrixValue type
openfluid::base::FrameworkException | if the value is not of the MatrixValue type |
const NullValue& openfluid::core::Value::asNullValue | ( | ) | const |
Returns the value as a constant NullValue if the value is of the NullValue type
openfluid::base::FrameworkException | if the value is not of the NullValue type |
NullValue& openfluid::core::Value::asNullValue | ( | ) |
Returns the value as a NullValue if the value is of the NullValue type
openfluid::base::FrameworkException | if the value is not of the NullValue type |
const StringValue& openfluid::core::Value::asStringValue | ( | ) | const |
Returns the value as a constant StringValue if the value is of the StringValue type
openfluid::base::FrameworkException | if the value is not of the StringValue type |
StringValue& openfluid::core::Value::asStringValue | ( | ) |
Returns the value as a StringValue if the value is of the StringValue type
openfluid::base::FrameworkException | if the value is not of the StringValue type |
const TreeValue& openfluid::core::Value::asTreeValue | ( | ) | const |
Returns the value as a constant TreeValue if the value is of the TreeValue type
openfluid::base::FrameworkException | if the value is not of the TreeValue type |
TreeValue& openfluid::core::Value::asTreeValue | ( | ) |
Returns the value as a TreeValue if the value is of the TreeValue type
openfluid::base::FrameworkException | if the value is not of the TreeValue type |
const VectorValue& openfluid::core::Value::asVectorValue | ( | ) | const |
Returns the value as a constant VectorValue if the value is of the VectorValue type
openfluid::base::FrameworkException | if the value is not of the VectorValue type |
VectorValue& openfluid::core::Value::asVectorValue | ( | ) |
Returns the value as a VectorValue if the value is of the VectorValue type
openfluid::base::FrameworkException | if the value is not of the VectorValue type |
|
inlinevirtual |
|
inlinevirtual |
|
static |
Returns the name of the type corresponding to the given type
[in] | ValueType | The value type |
|
pure virtual |
|
static |
Gets the value type ciorresponding to the name of the type
[in] | ValueTypeString | The type name as a string |
[out] | ValueType | The value type |
|
inline |
Returns true if the value is a BooleanValue
|
pure virtual |
Implemented in openfluid::core::NullValue, openfluid::core::CompoundValue, and openfluid::core::SimpleValue.
|
inline |
Returns true if the Value is a DoubleValue
|
inline |
Returns true if the value is an IntegerValue
|
inline |
Returns true if the value is a MapValue
|
inline |
Returns true if the value is a MatrixValue
|
inline |
Returns true if the value is a NullValue
|
pure virtual |
Implemented in openfluid::core::NullValue, openfluid::core::CompoundValue, and openfluid::core::SimpleValue.
|
inline |
Returns true if the value is a StringValue
|
inline |
Returns true if the value is a TreeValue
|
inline |
Returns true if the value is a VectorValue
Assignment operator
Reimplemented in openfluid::core::MapValue, openfluid::core::VectorValue, openfluid::core::StringValue, openfluid::core::MatrixValue, openfluid::core::IntegerValue, openfluid::core::BooleanValue, openfluid::core::DoubleValue, and openfluid::core::TreeValue.
std::string openfluid::core::Value::toString | ( | ) | const |
Returns the value as a string
|
pure virtual |
|
pure virtual |
|
friend |