Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Containers/ChunkedArray.h |
| Include | #include "Containers/ChunkedArray.h" |
Syntax
template<typename InElementType, uint32 TargetBytesPerChunk, typename AllocatorType>
class TChunkedArray
Remarks
An array that uses multiple allocations to avoid allocation failure due to fragmentation.
Variables
| Type | Name | Description | |
|---|---|---|---|
| ChunksType | Chunks | ||
| int32 | NumElements | The number of elements in the array. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TChunkedArray
(
int32 InNumElements |
Initialization constructor. | ||
TChunkedArray
(
TChunkedArray&& Other |
|||
TChunkedArray
(
const TChunkedArray& |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Add
(
int32 Count |
||
| int32 | AddElement
(
const ElementType& Item |
Adds a new item to the end of the chunked array. | |
| FConstIterType | begin () |
||
| FIterType | begin () |
||
| void | CopyToLinearArray
(
TArray< ElementType, OtherAllocator >& DestinationArray |
||
| void | Empty
(
int32 Slack |
||
| FConstIterType | end () |
||
| FIterType | end () |
||
| SIZE_T | |||
| bool | IsEmpty () |
Returns true if the chunked array is empty and contains no elements. | |
| bool | IsValidIndex
(
int32 Index |
Tests if index is valid, i.e. greater than zero and less than number of elements in array. | |
| int32 | Num () |
||
| void | Reserve
(
int32 Number |
Reserves memory such that the array can contain at least Number elements. | |
| void | Shrink () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| ElementType & | operator()
(
int32 ElementIndex |
Accessors. | |
| const ElementType & | operator()
(
int32 ElementIndex |
||
| ElementType & | operator[]
(
int32 ElementIndex |
||
| const ElementType & | operator[]
(
int32 ElementIndex |
||
| TChunkedArray & | operator+=
(
const TArray< ElementType >& Other |
Appends the specified array to this array. Cannot append to self. | |
| TChunkedArray & | operator+=
(
const TChunkedArray& Other |
||
| TChunkedArray & | operator=
(
const TChunkedArray& |
||
| TChunkedArray & | operator=
(
TChunkedArray&& Other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FChunk | A chunk of the array's elements. |
Typedefs
| Name | Description |
|---|---|
| ChunksType | The chunks of the array's elements. |
| ElementType | |
| FConstIterType | |
| FIterType |
Constants
| Name | Description |
|---|---|
| NumElementsPerChunk |