Navigation
API > API/Runtime > API/Runtime/Core
| Name | TSparseArrayBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/SparseArray.h |
| Include Path | #include "Containers/SparseArray.h" |
Syntax
template<size_t SizeOfElementType, size_t AlignOfElementType, typename Allocator>
class TSparseArrayBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr TSparseArrayBase () |
Default constructor. | Containers/SparseArray.h | |
| Containers/SparseArray.h | |||
consteval TSparseArrayBase
(
EConstEval |
Explicitly consteval constructor. | Containers/SparseArray.h | |
TSparseArrayBase
(
const TSparseArrayBase& InCopy |
Copy constructor. | Containers/SparseArray.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AllocationBitArrayType | TBitArray< typename Allocator::BitArrayAllocator > | Containers/SparseArray.h | |
| DataType | TArray< FElementOrFreeListLink, typename Allocator::ElementAllocator > | Containers/SparseArray.h | |
| FElementOrFreeListLink | TSparseArrayElementOrFreeListLink< TAlignedBytes< SizeOfElementType, AlignOfElementType > > | The element type stored is only indirectly related to the element type requested, to avoid instantiating TArray redundantly for compatible types. | Containers/SparseArray.h |
Functions
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Allocates space for an element in the array. | Containers/SparseArray.h | ||
FSparseArrayAllocationInfo AddUninitializedAtLowestFreeIndex
(
int32& LowestFreeIndexSearchStart |
Containers/SparseArray.h | ||
FSparseArrayAllocationInfo AllocateIndex
(
int32 Index |
Marks an index as allocated, and returns information about the allocation. | Containers/SparseArray.h | |
bool Compact () |
Compacts the allocated elements into a contiguous index range. | Containers/SparseArray.h | |
int32 GetMaxIndex() |
Containers/SparseArray.h | ||
FSparseArrayAllocationInfo InsertUninitialized
(
int32 Index |
Allocates space for an element in the array at a given index. | Containers/SparseArray.h | |
bool IsAllocated
(
int32 Index |
Containers/SparseArray.h | ||
bool IsEmpty() |
Containers/SparseArray.h | ||
bool IsValidIndex
(
int32 Index |
Containers/SparseArray.h | ||
int32 Max() |
Containers/SparseArray.h | ||
int32 Num() |
Containers/SparseArray.h | ||
void RemoveAtUninitialized
(
int32 Index, |
Removes Count elements from the array, starting from Index, without destructing them. | Containers/SparseArray.h | |
void Reserve
(
int32 ExpectedNumElements |
Preallocates enough memory to contain the specified number of elements. | Containers/SparseArray.h | |
void Shrink() |
Shrinks the array's storage to avoid slack. | Containers/SparseArray.h | |
void SortFreeList () |
Sort the free element list so that subsequent allocations will occur in the lowest available position resulting in tighter packing without moving any existing items. | Containers/SparseArray.h |