10#include <Common/primitive_type.h>
22template<
typename Variant>
47 std::size_t
index()
const;
90 template<
typename Func>
99 std::size_t numElements = 0;
105 std::size_t tupleSize = 0;
127 template<
typename ElementType>
129 ElementType* elementPtr,
133 bool canDirectAccess =
false);
152 requires std::is_arithmetic_v<T> || std::is_enum_v<T>
153 std::optional<T>
get(std::size_t elementIdx)
const;
156 requires std::is_pointer_v<T>
157 T
get(std::size_t elementIdx)
const;
160 requires std::is_arithmetic_v<T> || std::is_enum_v<T>
161 bool set(std::size_t elementIdx, T value)
const;
164 requires std::is_pointer_v<T>
165 bool set(std::size_t elementIdx, T ptr)
const;
168 requires std::is_null_pointer_v<T>
169 bool set(std::size_t elementIdx, T nullPtr)
const;
176 T* directAccess()
const;
180 bool isIntegerElement()
const;
181 bool isFloatingPointElement()
const;
183 operator bool ()
const;
189 template<
typename ElementType>
190 static auto permissiveElementGetter(ElementType* elementPtr) ->
SdlGetterVariant;
195 template<
typename ElementType>
196 static auto permissiveElementSetter(
SdlSetterVariant input, ElementType* out_elementPtr) -> bool;
Definition SdlNativeData.h:88
uint8 isNullClearable
Whether the data can be set as empty by assigning null to it. For example, if this flag is true and t...
Definition SdlNativeData.h:120
bool set(std::size_t elementIdx, T nullPtr) const
bool set(std::size_t elementIdx, T ptr) const
A type-safe, lightweight wrapper for any raw pointer type. Using std::any with a raw pointer type cou...
Definition TAnyPtr.h:17
Definition SdlNativeData.h:24
Variant VariantType
Definition SdlNativeData.h:26
T & get()
Definition SdlNativeData.ipp:38
auto getVariant() -> VariantType &
Definition SdlNativeData.ipp:72
bool has() const
Definition SdlNativeData.ipp:31
TSdlAccessorVariant()
Definition SdlNativeData.ipp:14
bool isEmpty() const
Definition SdlNativeData.ipp:66
void set(T value)
Definition SdlNativeData.ipp:54
std::size_t index() const
Definition SdlNativeData.ipp:60
References a SDL object. This is a lightweight utility for referencing SDL objects....
Definition TSdlAnyInstance.h:20
Definition TFunction.h:23
The root for all renderer implementations.
Definition EEngineProject.h:6
TSdlAccessorVariant< std::variant< std::monostate, int64, float64, SdlConstInstance, AnyConstPtr > > SdlGetterVariant
Definition SdlNativeData.h:57
ESdlDataFormat
Format of the data used by SDL. Each listed data format tells how a group of data is arranged interna...
Definition ESdlDataFormat.h:13
ESdlDataType
Common data types used by SDL. Each listed data type has some form of one to one mapping to a specifi...
Definition ESdlDataType.h:13