VoidValue.cpp
Go to the documentation of this file.
#include "VoidValue.h"
#include "HazelnuppException.h"
using namespace Hazelnp;
VoidValue::VoidValue()
:
Value(DATA_TYPE::VOID)
{
return;
}
Value* VoidValue::Deepcopy() const
{
return new VoidValue();
}
std::string VoidValue::GetAsOsString() const
{
return "VoidValue";
}
long long int VoidValue::GetInt64() const
{
throw HazelnuppValueNotConvertibleException();
}
int VoidValue::GetInt32() const
{
throw HazelnuppValueNotConvertibleException();
}
long double VoidValue::GetFloat64() const
{
throw HazelnuppValueNotConvertibleException();
}
double VoidValue::GetFloat32() const
{
throw HazelnuppValueNotConvertibleException();
}
std::string VoidValue::GetString() const
{
throw HazelnuppValueNotConvertibleException();
}
const std::vector<Value*>& VoidValue::GetList() const
{
throw HazelnuppValueNotConvertibleException();
}
HazelnuppException.h
Hazelnp
Definition: DataType.h:3
Hazelnp::VoidValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:25
Hazelnp::VoidValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:35
Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::VoidValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: VoidValue.cpp:18
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
Hazelnp::VoidValue::GetList
const std::vector< Value * > & GetList() const
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:50
Hazelnp::VoidValue::GetInt32
int GetInt32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:30
VoidValue.h
Hazelnp::VoidValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: VoidValue.cpp:13
Hazelnp::VoidValue::GetString
std::string GetString() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:45
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
Hazelnp::VoidValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:40
Hazelnp::VoidValue::VoidValue
VoidValue()
Definition: VoidValue.cpp:6
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35