10#include "Refureku/TypeInfo/Variables/VariableBase.h"
11#include "Refureku/TypeInfo/Variables/EVarFlags.h"
18 REFUREKU_API
Variable(
char const* name,
23 REFUREKU_API
Variable(
char const* name,
46 template <
typename ValueType>
47 RFK_NODISCARD ValueType
get()
const;
59 template <
typename ValueType>
60 void set(ValueType&& value)
const;
70 REFUREKU_API
void set(
void const* valuePtr,
71 std::size_t valueSize)
const;
78 RFK_NODISCARD REFUREKU_API
bool isStatic() const noexcept;
95 RFK_NODISCARD REFUREKU_API
void*
getPtr() const;
102 RFK_NODISCARD REFUREKU_API
void const*
getConstPtr() const noexcept;
108 RFK_GEN_GET_PIMPL(VariableImpl,
Entity::getPimpl())
112 template <auto VarPtr>
118 #include "Refureku/TypeInfo/Variables/Variable.inl"
Definition: Allocator.h:19
Definition: VariableBase.h:20
Definition: Variable.h:16
RFK_NODISCARD ValueType get() const
Get the value stored in this variable. This method in not safe if you provide a wrong ValueType.
RFK_NODISCARD REFUREKU_API void const * getConstPtr() const noexcept
Get a const pointer to this static field.
RFK_NODISCARD REFUREKU_API void * getPtr() const
Get a non-const pointer to this variable. Performing non-const operations with the pointer if the var...
RFK_NODISCARD REFUREKU_API bool isStatic() const noexcept
Check if this variable is static.
RFK_NODISCARD REFUREKU_API EVarFlags getFlags() const noexcept
Getter for the field _flags.
void set(ValueType &&value) const
Set some value in this variable. This method is not safe if you provide a wrong ValueType.
REFUREKU_API void set(void const *valuePtr, std::size_t valueSize) const
Copy dataSize bytes starting from value into the variable.
Definition: Allocator.h:16
EVarFlags
Definition: EVarFlags.h:16
Variable const * getVariable() noexcept