ListValue.h
Go to the documentation of this file.
#pragma once
#include "Value.h"
#include <vector>
namespace Hazelnp
{
class ListValue : public Value
{
public:
ListValue();
~ListValue() override;
Value* Deepcopy() const override;
std::string GetAsOsString() const override;
void AddValue(const Value* value);
const std::vector<Value*>& GetValue() const;
operator std::vector<Value*>() 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:
std::vector<Value*> value;
};
}
Hazelnp::ListValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: ListValue.cpp:44
Hazelnp
Definition: DataType.h:3
Hazelnp::ListValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:84
Hazelnp::ListValue::GetString
std::string GetString() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:89
Hazelnp::ListValue::GetList
const std::vector< Value * > & GetList() const override
Will return this values list.
Definition: ListValue.cpp:94
Hazelnp::ListValue::GetValue
const std::vector< Value * > & GetValue() const
Will return the raw value.
Definition: ListValue.cpp:39
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
Hazelnp::ListValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:69
Hazelnp::ListValue::GetInt32
int GetInt32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:74
Hazelnp::ListValue::AddValue
void AddValue(const Value *value)
Will add this value to the list.
Definition: ListValue.cpp:33
Hazelnp::ListValue::~ListValue
~ListValue() override
Definition: ListValue.cpp:13
Hazelnp::ListValue::ListValue
ListValue()
Definition: ListValue.cpp:7
Hazelnp::ListValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: ListValue.cpp:23
Hazelnp::ListValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:79
Hazelnp::ListValue
Specializations for list values (uses std::vector<Value*>)
Definition: ListValue.h:9
Value.h