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

#include <core/DoubleValue.hpp>

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

Public Member Functions

 DoubleValue ()
 
 DoubleValue (const DoubleValue &Val)
 
 DoubleValue (const double &POD)
 
virtual ~DoubleValue ()
 
Valueoperator= (const Value &Other)
 
 operator double () const
 
Type getType () const
 
Valueclone () const
 
bool convert (Value &Val) const
 
double get () const
 
void set (const double &Val)
 
void writeToStream (std::ostream &OutStm) const
 
void writeQuotedToStream (std::ostream &OutStm) const
 
- Public Member Functions inherited from openfluid::core::SimpleValue
 SimpleValue ()
 
bool isSimple () const
 
bool isCompound () const
 
- Public Member Functions inherited from openfluid::core::Value
 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 ()
 
bool isTreeValue () const
 
const TreeValueasTreeValue () const
 
TreeValueasTreeValue ()
 
std::string toString () const
 

Additional Inherited Members

- Public Types inherited from openfluid::core::Value
enum  Type {
  NONE, BOOLEAN, INTEGER, DOUBLE,
  STRING, VECTOR, MATRIX, MAP,
  TREE, 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

DoubleValue is a container for a signed double precision floating point value.

See Also
Value


Example : declaration

// declaration of a DoubleValue, initialized to 0.0 by default
// declaration of a DoubleValue, initialized to 1.357

Example : getting the contained value

double 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(101.99);

Example : conversion from string

openfluid::core::StringValue StringVal("57.33");
// to DoubleValue
Val1 = StringVal.toDoubleValue();
// to double
double DblVal = StringVal.toDouble();

Example : conversion to string

std::string StdStrVal = Val1.toString();

Constructor & Destructor Documentation

openfluid::core::DoubleValue::DoubleValue ( )
inline

Default constructor

openfluid::core::DoubleValue::DoubleValue ( const DoubleValue Val)
inline

Copy constructor

openfluid::core::DoubleValue::DoubleValue ( const double &  POD)
inline

Constructor from plain old type

virtual openfluid::core::DoubleValue::~DoubleValue ( )
inlinevirtual

Member Function Documentation

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

Reimplemented from openfluid::core::Value.

bool openfluid::core::DoubleValue::convert ( Value Val) const
virtual

Reimplemented from openfluid::core::Value.

double openfluid::core::DoubleValue::get ( ) const
inline

Returns the double value as plain old type

Returns
the double value
Type openfluid::core::DoubleValue::getType ( ) const
inlinevirtual
openfluid::core::DoubleValue::operator double ( ) const
inline

Cast operator

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

Assignment operator

Reimplemented from openfluid::core::Value.

void openfluid::core::DoubleValue::set ( const double &  Val)
inline

Sets the plain old type double value

Parameters
[in]Valthe double value
void openfluid::core::DoubleValue::writeQuotedToStream ( std::ostream &  OutStm) const
inlinevirtual
void openfluid::core::DoubleValue::writeToStream ( std::ostream &  OutStm) const
virtual

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