14#include "Refureku/TypeInfo/Entity/Entity.h"
15#include "Refureku/TypeInfo/Type.h"
31 class VariableBaseImpl;
34 static constexpr
bool is_value_v = !std::is_lvalue_reference_v<T> && !std::is_rvalue_reference_v<T>;
36 REFUREKU_INTERNAL
VariableBase(VariableBaseImpl* implementation) noexcept;
40 RFK_GEN_GET_PIMPL(VariableBaseImpl,
Entity::getPimpl())
59 template <typename ValueType>
60 RFK_NODISCARD ValueType
get(
void* ptr) const;
80 template <typename ValueType>
81 RFK_NODISCARD ValueType
get(
void const* ptr) const;
96 template <typename ValueType>
98 ValueType&& value) const;
109 REFUREKU_INTERNAL
void set(
void* target,
111 std::
size_t bytesCount) const;
122 #include "Refureku/TypeInfo/Variables/VariableBase.inl"
Definition: VariableBase.h:20
RFK_NORETURN static REFUREKU_API void throwConstViolationException(char const *message)
Throw a ConstViolation exception with the specified message. /!\ This method is called from template ...
REFUREKU_API Type const & getType() const noexcept
Get the type of this variable.
RFK_NODISCARD ValueType get(void *ptr) const
Get the data stored in the provided ptr. This method in not safe if you provide a wrong DataType.
void set(void *ptr, ValueType &&value) const
Set the provided pointer content. This method is not safe if you provide a wrong ValueType.
Definition: Allocator.h:16