3#include <Foundation/Basics.h>
4#include <Foundation/Containers/Blob.h>
5#include <Foundation/Containers/DynamicArray.h>
18 plUInt32 m_uiTypeSize = 0;
19 plUInt32 m_uiTypeAlignment = 0;
20 plMemoryUtils::ConstructorFunction m_ConstructorFunction =
nullptr;
21 plMemoryUtils::DestructorFunction m_DestructorFunction =
nullptr;
24 PL_ALWAYS_INLINE
void FillFromType()
26 m_uiTypeSize =
sizeof(T);
27 m_uiTypeAlignment = PL_ALIGNMENT_OF(T);
50 [[nodiscard]]
plBlob AllocateAndConstruct()
const;
53 void DestructAndDeallocate(
plBlob& ref_blob)
const;
61 return (uiOffset != plInvalidIndex) ? blobPtr.
GetPtr() + uiOffset :
nullptr;
66 plUInt32 m_uiTotalDataSize = 0;
plBlob allows to store simple binary data larger than 4GB. This storage class is used by plImage to a...
Definition Blob.h:319
PL_ALWAYS_INLINE PointerType GetPtr() const
Returns the pointer to the array.
Definition Blob.h:80
Definition DynamicArray.h:81
Helper class to manager instance data allocation, construction and destruction.
Definition InstanceDataAllocator.h:35
plUInt32 GetTotalDataSize() const
The total size in bytes taken up by all instance data objects that were added.
Definition InstanceDataAllocator.h:56
static PL_ALWAYS_INLINE void * GetInstanceData(const plByteBlobPtr &blobPtr, plUInt32 uiOffset)
Retrieves a void pointer to the instance data within the given blob at the given offset,...
Definition InstanceDataAllocator.h:59
static ConstructorFunction MakeConstructorFunction()
Returns a function pointer to construct an instance of T. Returns nullptr for trivial types.
static DestructorFunction MakeDestructorFunction()
Returns a function pointer to destruct an instance of T. Returns nullptr for POD-types.
Structure to describe an instance data type.
Definition InstanceDataAllocator.h:17