Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
openfluid::core::Value Class Referenceabstract

#include <core/Value.hpp>

Inheritance diagram for openfluid::core::Value:
Inheritance graph
[legend]

Public Types

enum  Type {
  NONE, BOOLEAN, INTEGER, DOUBLE,
  STRING, VECTOR, MATRIX, MAP,
  TREE, NULLL
}
 

Public Member Functions

 Value ()
 
virtual ~Value ()
 
virtual Valueoperator= (const Value &)
 
virtual Type getType () const =0
 
virtual Valueclone () 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 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 ()
 
bool isTreeValue () const
 
const TreeValueasTreeValue () const
 
TreeValueasTreeValue ()
 
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)
 

Member Enumeration Documentation

Enumerator
NONE 
BOOLEAN 
INTEGER 
DOUBLE 
STRING 
VECTOR 
MATRIX 
MAP 
TREE 
NULLL 

Constructor & Destructor Documentation

openfluid::core::Value::Value ( )
inline
virtual openfluid::core::Value::~Value ( )
inlinevirtual

Member Function Documentation

const BooleanValue& openfluid::core::Value::asBooleanValue ( ) const

Returns the value as a constant BooleanValue if the value is of the BooleanValue type

Returns
the value as a constant BooleanValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a BooleanValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant DoubleValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a DoubleValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant IntegerValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a IntegerValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant MapValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a MapValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant MatrixValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a MatrixValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant NullValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a NullValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant StringValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a StringValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant TreeValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a TreeValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a constant VectorValue
Exceptions
openfluid::base::FrameworkExceptionif 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

Returns
the value as a VectorValue
Exceptions
openfluid::base::FrameworkExceptionif the value is not of the VectorValue type
virtual Value* openfluid::core::Value::clone ( ) const
inlinevirtual
virtual bool openfluid::core::Value::convert ( Value ) const
inlinevirtual
static std::string openfluid::core::Value::getStringFromValueType ( const Value::Type  ValueType)
static

Returns the name of the type corresponding to the given type

Parameters
[in]ValueTypeThe value type
Returns
the type name
virtual Type openfluid::core::Value::getType ( ) const
pure virtual
static bool openfluid::core::Value::getValueTypeFromString ( const std::string &  ValueTypeString,
Value::Type ValueType 
)
static

Gets the value type ciorresponding to the name of the type

Parameters
[in]ValueTypeStringThe type name as a string
[out]ValueTypeThe value type
Returns
false if the type name does not exist or is misspelled, true otherwise
bool openfluid::core::Value::isBooleanValue ( ) const
inline

Returns true if the value is a BooleanValue

virtual bool openfluid::core::Value::isCompound ( ) const
pure virtual
bool openfluid::core::Value::isDoubleValue ( ) const
inline

Returns true if the Value is a DoubleValue

bool openfluid::core::Value::isIntegerValue ( ) const
inline

Returns true if the value is an IntegerValue

bool openfluid::core::Value::isMapValue ( ) const
inline

Returns true if the value is a MapValue

bool openfluid::core::Value::isMatrixValue ( ) const
inline

Returns true if the value is a MatrixValue

bool openfluid::core::Value::isNullValue ( ) const
inline

Returns true if the value is a NullValue

virtual bool openfluid::core::Value::isSimple ( ) const
pure virtual
bool openfluid::core::Value::isStringValue ( ) const
inline

Returns true if the value is a StringValue

bool openfluid::core::Value::isTreeValue ( ) const
inline

Returns true if the value is a TreeValue

bool openfluid::core::Value::isVectorValue ( ) const
inline

Returns true if the value is a VectorValue

virtual Value& openfluid::core::Value::operator= ( const Value )
inlinevirtual
std::string openfluid::core::Value::toString ( ) const

Returns the value as a string

virtual void openfluid::core::Value::writeQuotedToStream ( std::ostream &  OutStm) const
pure virtual
virtual void openfluid::core::Value::writeToStream ( std::ostream &  OutStm) const
pure virtual

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  OutStm,
const Value Val 
)
friend

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