Navigation
API > API/Runtime > API/Runtime/Core
Base class for the compact set provides common functionality to manage the data using FCompactSetLayout to describe it
| Name | TCompactSetBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/CompactSetBase.h |
| Include Path | #include "Containers/CompactSetBase.h" |
Syntax
template<typename Allocator>
class TCompactSetBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
consteval TCompactSetBase
(
EConstEval |
Containers/CompactSetBase.h | ||
| Containers/CompactSetBase.h | |||
| Containers/CompactSetBase.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AllocatorType | Allocator | Containers/CompactSetBase.h | |
| ElementAllocatorType | typename AllocatorType::template ForElementType< uint8 > | Containers/CompactSetBase.h | |
| HashCountType | uint32 | Containers/CompactSetBase.h | |
| SizeType | typename AllocatorType::SizeType | Containers/CompactSetBase.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| HashCountSize | size_t | Containers/CompactSetBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SIZE_T GetAllocatedSize
(
const FCompactSetLayout Layout |
Helper function to return the amount of memory allocated by this container Only returns the size of allocations made directly by the container, not the elements themselves. | Containers/CompactSetBase.h | |
int32 GetMaxIndex() |
Deprecated - unnecessary, keeping this here so TCompactSet can be swapped with TSet without changing code | Containers/CompactSetBase.h | |
bool IsEmpty () |
Returns true if the sets is empty and contains no elements. | Containers/CompactSetBase.h | |
int32 Max() |
Containers/CompactSetBase.h | ||
int32 Num() |
Containers/CompactSetBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AllocatorCalculateSlackGrow
(
int32 NewMaxElements, |
Containers/CompactSetBase.h | ||
FConstCompactHashTableView GetConstHashTableView
(
const FCompactSetLayout Layout |
Containers/CompactSetBase.h | ||
const HashCountType * GetHashTableMemory
(
const FCompactSetLayout Layout |
Calculate the size of the hash table from the number of elements in the set | Containers/CompactSetBase.h | |
FCompactHashTableView GetHashTableView
(
const FCompactSetLayout Layout |
Containers/CompactSetBase.h | ||
void ResizeAllocation
(
const int32 NewMaxElements, |
Containers/CompactSetBase.h | ||
bool ResizeAllocationPreserveData
(
const int32 NewMaxElements, |
Use this is you'll be keeping the element data. | Containers/CompactSetBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static size_t GetElementsSizeInBytes
(
uint32 NumElements, |
Calculate bytes required to store the elements, includes any padding required for the hash table | Containers/CompactSetBase.h | |
static SizeType GetHashCount
(
uint32 NumElements |
Calculate the size of the hash table from the number of elements in the set | Containers/CompactSetBase.h | |
static SizeType GetMaxElementsForAvailableSpace
(
size_t TotalBytes, |
The total amount of memory required by the has set to store N elements with a hash table size of Y | Containers/CompactSetBase.h | |
static size_t GetTotalMemoryRequiredInBytes
(
uint32 NumElements, |
Get the total memory required for the compact set for the given number of elements and size of the number of hash elements | Containers/CompactSetBase.h | |
static size_t GetTotalMemoryRequiredInBytes
(
uint32 NumElements, |
Calculate the size of the hash table from the number of elements in the set assuming the default number of hash elements | Containers/CompactSetBase.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator==
(
FIntrusiveUnsetOptionalState Tag |
Containers/CompactSetBase.h |