Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Plugins/Experimental/StructUtils/Source/StructUtils/Public/ChunkedStructBuffer.h |
Include |
#include "ChunkedStructBuffer.h" |
USTRUCT()
struct FChunkedStructBuffer
Buffer where you can append heterogeneous structs, and iterate over them in order (no random access).
If you use move assign or Append(&&), make sure to call Compact() or you may end up with large free list.
Name | Description | ||
---|---|---|---|
|
ChunkSize |
Number of items stored in the buffer |
|
|
FChunkHeader &#... |
First |
|
|
FChunkHeader &#... |
FreeList |
Pointer to the last chunk in use |
|
FChunkHeader &#... |
Head |
Pointer to the first chunk in use |
|
NumItems |
Free list of unused chunks |
Name | Description | |
---|---|---|
|
FChunkedStructBuffer ( |
|
|
FChunkedStructBuffer ( |
|
|
FChunkedStructBuffer ( |
Name | Description | |
---|---|---|
|
~FChunkedStructBuffer() |
Name | Description | ||
---|---|---|---|
|
Add ( |
Adds struct to the buffer based on ScriptStruct and pointer. |
|
|
Add ( |
Add new struct in the buffer. |
|
|
T & |
Add_GetRef ( |
Add new struct in the buffer, and return reference to it. |
|
AddStructReferencedObjects ( |
||
|
AllocateNewChunk() |
Allocates a new chunk and makes it the head of the chunk list. |
|
|
uint8 * |
AllocItem ( |
Allocates an item of specified type. |
|
Append ( |
||
|
Append ( |
||
|
Clear() |
Resets and clears all structs, and releases unused internal memory. |
|
|
Compact() |
Releases unused internal memory. |
|
|
Emplace ( |
Emplaces struct in the buffer. |
|
|
T & |
Emplace_GetRef ( |
Emplaces struct in the buffer, and returns reference to it. |
|
ForEach ( |
Iterates over all structs of specified type T and calls Function on each item. |
|
|
ForEach ( |
Iterates over all structs and calls Function on each item |
|
|
ForEachFiltered ( |
Iterates over all structs of specified types and calls Function on each item |
|
|
GetChunkSize() |
||
|
GetNumFreeChunks() |
||
|
GetNumUsedChunks() |
||
|
GetScriptStructs ( |
Returns struct types in the buffer |
|
|
IsEmpty() |
||
|
Num() |
||
|
Reset() |
Resets and clears all structs, keeps internal memory. |
Name | Description | ||
---|---|---|---|
|
FChunkedStru... |
operator= ( |
|
|
FChunkedStru... |
operator= ( |
Name |
Description |
|
---|---|---|
|
FChunkHeader |
Header for a chunk of items. |
|
FItemHeader |
Header for each item in a chunk. Allocated before the item in tge chunk memory. |
Name |
Description |
---|---|
DefaultChunkSize |
|
MaxScriptStructsPerChunk |
Number of unique struct types that can be stored per chunk. |