IntValue.h
Go to the documentation of this file.
#pragma once
#include "Value.h"
namespace Hazelnp
{
class IntValue : public Value
{
public:
IntValue(const long long int& value);
~IntValue() override {};
Value* Deepcopy() const override;
std::string GetAsOsString() const override;
const long long int& GetValue() const;
operator long long int() const;
operator int() const;
long long int GetInt64() const override;
int GetInt32() const override;
long double GetFloat64() const override;
double GetFloat32() const override;
std::string GetString() const override;
const std::vector<Value*>& GetList() const override;
private:
long long int value;
};
}
Hazelnp::IntValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: IntValue.cpp:20
Hazelnp
Definition: DataType.h:3
Hazelnp::IntValue
Specializations for integer values (uses long long int)
Definition: IntValue.h:8
Hazelnp::IntValue::GetFloat32
double GetFloat32() const override
Will return the data as a double.
Definition: IntValue.cpp:59
Hazelnp::IntValue::~IntValue
~IntValue() override
Definition: IntValue.h:12
Hazelnp::IntValue::IntValue
IntValue(const long long int &value)
Definition: IntValue.cpp:7
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
Hazelnp::IntValue::GetInt32
int GetInt32() const override
Will return the data as an int.
Definition: IntValue.cpp:49
Hazelnp::IntValue::GetList
const std::vector< Value * > & GetList() const override
Throws HazelnuppValueNotConvertibleException.
Definition: IntValue.cpp:72
Hazelnp::IntValue::GetFloat64
long double GetFloat64() const override
Will return the data as a long double.
Definition: IntValue.cpp:54
Hazelnp::IntValue::GetString
std::string GetString() const override
Will return the data as a string.
Definition: IntValue.cpp:64
Hazelnp::IntValue::GetInt64
long long int GetInt64() const override
Will return the data as a long long int.
Definition: IntValue.cpp:44
Hazelnp::IntValue::GetValue
const long long int & GetValue() const
Will return the raw value.
Definition: IntValue.cpp:27
Hazelnp::IntValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: IntValue.cpp:15
Value.h