Navigation
API > API/Runtime > API/Runtime/GeometryCore
FSmallListSet stores a set of short integer-valued variable-size lists. The lists are encoded into a few large TDynamicVector buffers, with internal pooling, so adding/removing lists usually does not involve any new or delete ops.
The lists are stored in two parts. The first N elements are stored in a linear subset of a TDynamicVector. If the list spills past these N elements, the extra elements are stored in a linked list (which is also stored in a flat array).
Each list stores its count, so list-size operations are constant time. All the internal "pointers" are 32-bit.
| Name | FSmallListSet |
| Type | class |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Util/SmallListSet.h |
| Include Path | #include "Util/SmallListSet.h" |
Syntax
class FSmallListSet
Classes
| Name | Remarks |
|---|---|
| BaseValueIterator | BaseValueIterator is a base class for ValueIterator and MappedValueIterator below. |
| MappedValueEnumerable | MappedValueEnumerable is an object that provides begin/end semantics for a small list, suitable for use with a range-based for loop |
| MappedValueIterator | MappedValueIterator iterates over the values of a small list An optional mapping function can be provided which will then be applied to the values returned by the * operator |
| ValueEnumerable | ValueEnumerable is an object that provides begin/end semantics for a small list, suitable for use with a range-based for loop |
| ValueIterator | ValueIterator iterates over the values of a small list |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BLOCK_LIST_OFFSET | int32 | Offset from start of linear-memory portion of list that contains pointer to head of variable-length linked list | Util/SmallListSet.h |
| BLOCKSIZE | int32 | Size of initial linear-memory portion of lists | Util/SmallListSet.h |
| NullValue | int32 | This value is used to indicate Null in internal pointers | Util/SmallListSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AllocateAt
(
int32 ListIndex |
Create a list at the given ListIndex | Util/SmallListSet.h | |
void AppendWithElementOffset
(
const FSmallListSet& Other, |
Append all elements from another small list set, with ElementOffset added to all such appended elements Note: Also directly appends free blocks / free lists; does no compacting | Util/SmallListSet.h | |
MappedValueIterator BeginMappedValues
(
int32 ListIndex, |
Util/SmallListSet.h | ||
ValueIterator BeginValues
(
int32 ListIndex |
Util/SmallListSet.h | ||
void Clear
(
int32 ListIndex |
Remove all elements from the list at ListIndex | Util/SmallListSet.h | |
void Compact
(
int32 MaxListIndex |
Clearing any lists at or after MaxListIndex and compact the ListBlocks and LinkedListElements so there are no free blocks or free linked list elements | Util/SmallListSet.h | |
bool Contains
(
int32 ListIndex, |
Search for the given Value in list at ListIndex | Util/SmallListSet.h | |
MappedValueIterator EndMappedValues
(
int32 ListIndex, |
Util/SmallListSet.h | ||
ValueIterator EndValues
(
int32 ListIndex |
Util/SmallListSet.h | ||
void Enumerate
(
int32 ListIndex, |
Call ApplyFunc on each element of the list at ListIndex | Util/SmallListSet.h | |
bool EnumerateEarlyOut
(
int32 ListIndex, |
Call ApplyFunc on each element of the list at ListIndex, until ApplyFunc returns false | Util/SmallListSet.h | |
int32 Find
(
int32 ListIndex, |
Search the list at ListIndex for a value where PredicateFunc(value) returns true | Util/SmallListSet.h | |
int32 First
(
int32 ListIndex |
Does not check for zero-size-list! | Util/SmallListSet.h | |
SIZE_T GetByteCount() |
Util/SmallListSet.h | ||
int32 GetCount
(
int32 ListIndex |
Util/SmallListSet.h | ||
void Insert
(
int32 ListIndex, |
Insert Value into list at ListIndex | Util/SmallListSet.h | |
bool IsAllocated
(
int32 ListIndex |
Util/SmallListSet.h | ||
MappedValueEnumerable MappedValues
(
int32 ListIndex, |
Util/SmallListSet.h | ||
FString MemoryUsage() |
Util/SmallListSet.h | ||
void Move
(
int32 FromIndex, |
Move list at FromIndex to ToIndex | Util/SmallListSet.h | |
bool Remove
(
int32 ListIndex, |
Remove Value from the list at ListIndex | Util/SmallListSet.h | |
bool Replace
(
int32 ListIndex, |
Search the list at ListIndex for a value where PredicateFunc(value) returns true, and replace it with NewValue | Util/SmallListSet.h | |
void Reset() |
Reset to initial state | Util/SmallListSet.h | |
void Resize
(
int32 NewSize |
Set new number of lists | Util/SmallListSet.h | |
void Serialize
(
FArchive& Ar, |
Serialize FSmallListSet to an archive. | Util/SmallListSet.h | |
size_t Size() |
Util/SmallListSet.h | ||
ValueEnumerable Values
(
int32 ListIndex |
Util/SmallListSet.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddFreeLink
(
int32 ptr |
Push a link-node onto the free list | Util/SmallListSet.h | |
int32 AllocateBlock() |
Grab a block from the free list, or allocate a new one | Util/SmallListSet.h | |
bool RemoveFromLinkedList
(
int32 block_ptr, |
Remove val from the linked-list attached to block_ptr | Util/SmallListSet.h |