Navigation
API > API/Runtime > API/Runtime/CoreUObject
FScriptSetHelper: Pseudo dynamic Set. Used to work with Set properties in a sensible way. Note that the set can contain invalid entries some number of valid entries (i.e. Num() ) can be smaller that the actual number of elements (i.e. GetMaxIndex() ).
Internal index naming is used to identify the actual index in the container which can point to an invalid entry. It can be used for methods like Get
Logical index naming is used to identify only valid entries in the container so it can be smaller than the internal index in case we skipped invalid entries to reach the next valid one. This index is used on method like FindNth
| Name | FScriptSetHelper |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UnrealType.h |
| Include Path | #include "UObject/UnrealType.h" |
Syntax
class FScriptSetHelper
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScriptSetHelper
(
FProperty* InElementProp, |
UObject/UnrealType.h | ||
FScriptSetHelper
(
const FSetProperty* InProperty, |
Constructor, brings together a property and an instance of the property located in memory | UObject/UnrealType.h | |
| UObject/UnrealType.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FIterator | TScriptContainerIterator< FScriptSetHelper > | UObject/UnrealType.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ElementProp | FProperty * | UObject/UnrealType.h | ||
| Set | FScriptSet * | UObject/UnrealType.h | ||
| SetLayout | FScriptSetLayout | UObject/UnrealType.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AddDefaultValue_Invalid_NeedsRehash () |
Adds a blank, constructed value to a given size. | UObject/UnrealType.h | |
void AddElement
(
const void* ElementToAdd |
Adds the element to the set, returning true if the element was added, or false if the element was already present | UObject/UnrealType.h | |
int32 AddUninitializedValue() |
Add an uninitialized value to the end of the set. | UObject/UnrealType.h | |
FIterator CreateIterator
(
const int32 InLogicalIndex |
UObject/UnrealType.h | ||
FIterator CreateIterator () |
UObject/UnrealType.h | ||
void EmptyElements
(
int32 Slack |
Remove all values from the set, calling destructors, etc as appropriate. | UObject/UnrealType.h | |
int32 FindElementIndex
(
const void* ElementToFind, |
Finds the index of an element in a set | UObject/UnrealType.h | |
int32 FindElementIndexFromHash
(
const void* ElementToFind |
Finds element index from hash, rather than linearly searching | UObject/UnrealType.h | |
uint8 * FindElementPtr
(
const void* ElementToFind, |
Finds the pair in a map which matches the key in another pair. | UObject/UnrealType.h | |
uint8 * FindElementPtrFromHash
(
const void* ElementToFind |
Finds element pointer from hash, rather than linearly searching | UObject/UnrealType.h | |
int32 FindInternalIndex
(
int32 LogicalIdx |
Sets have gaps in their indices, so this function translates a logical index (ie. Nth element) to an internal index that can be used for the other functions in this class. | UObject/UnrealType.h | |
int32 FindLogicalIndex
(
int32 InternalIdx |
Sets have gaps in their indices, so this function translates a internal index to an logical index (ie. Nth element). | UObject/UnrealType.h | |
const uint8 * FindNthElementPtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid element in the set (skipping invalid entries). | UObject/UnrealType.h | |
uint8 * FindNthElementPtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid element in the set (skipping invalid entries). | UObject/UnrealType.h | |
FProperty * GetElementProperty() |
Returns the property representing the element of the set | UObject/UnrealType.h | |
const uint8 * GetElementPtr
(
int32 InternalIndex |
Returns a uint8 pointer to the element in the set. | UObject/UnrealType.h | |
const uint8 * GetElementPtr
(
const FIterator Iterator |
Returns a uint8 pointer to the element in the set. | UObject/UnrealType.h | |
uint8 * GetElementPtr
(
int32 InternalIndex |
Returns a uint8 pointer to the element in the set. | UObject/UnrealType.h | |
uint8 * GetElementPtr
(
const FIterator Iterator |
Returns a uint8 pointer to the element in the set. | UObject/UnrealType.h | |
int32 GetMaxIndex() |
Returns the (non-inclusive) maximum index of elements in the set. | UObject/UnrealType.h | |
bool IsValidIndex
(
int32 InternalIndex |
Index range check | UObject/UnrealType.h | |
void MoveAssign
(
void* InOtherSet |
Move the allocation from another set and make it our own. | UObject/UnrealType.h | |
int32 Num () |
Returns the number of elements in the set. | UObject/UnrealType.h | |
int32 NumUnchecked () |
Returns the number of elements in the set. | UObject/UnrealType.h | |
void Rehash() |
Rehashes the keys in the set. This function must be called to create a valid set. | UObject/UnrealType.h | |
void RemoveAt
(
int32 InternalIndex, |
Removes an element at the specified index, destroying it. | UObject/UnrealType.h | |
bool RemoveElement
(
const void* ElementToRemove |
Removes the element from the set | UObject/UnrealType.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FScriptSetHelper CreateHelperFormElementProperty
(
FProperty* InElementProperty, |
UObject/UnrealType.h | ||
static int32 Num
(
const void* Target |
Static version of Num() used when you don't need to bother to construct a FScriptSetHelper. | UObject/UnrealType.h |