![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UnrealType.h>
Inheritance diagram for FScriptSetHelper:Public Types | |
| using | FIterator = TScriptContainerIterator< FScriptSetHelper > |
Static Public Member Functions | |
| static int32 | Num (const void *Target) |
| static FScriptSetHelper | CreateHelperFormElementProperty (FProperty *InElementProperty, const void *InSet) |
Public Attributes | |
| FProperty * | ElementProp |
| FScriptSet * | Set |
| FScriptSetLayout | SetLayout |
Friends | |
| class | FSetProperty |
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<Item>Ptr, Get<Item>PtrWithoutCheck or IsValidIndex.
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<Item>Ptr or FindInternalIndex. This is also the type of index we receive from most editor events (e.g. property change events) so it is strongly suggested to rely on FScriptSetHelper::FIterator to iterate or convert to internal index.
|
inline |
Constructor, brings together a property and an instance of the property located in memory
| InProperty | The property associated with this memory |
| InSet | Pointer to raw memory that corresponds to this Set. This can be NULL, and sometimes is, but in that case almost all operations will crash. |
|
inline |
|
inline |
Adds a blank, constructed value to a given size. Note that this will create an invalid Set because all the keys will be default constructed, and the set needs rehashing.
Adds the element to the set, returning true if the element was added, or false if the element was already present
|
inline |
Add an uninitialized value to the end of the set.
|
inlinestatic |
|
inline |
Remove all values from the set, calling destructors, etc as appropriate.
| Slack | used to presize the set for a subsequent add, to avoid reallocation. |
|
inline |
Finds the index of an element in a set
| ElementToFind | The address of an element to search for. |
| IndexHint | The index to start searching from. |
Finds element index from hash, rather than linearly searching
Finds the pair in a map which matches the key in another pair.
| PairWithKeyToFind | The address of a map pair which contains the key to search for. |
| IndexHint | The index to start searching from. |
Finds element pointer from hash, rather than linearly searching
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. NOTE: This is slow, do not use this for iteration! Use CreateIterator() instead.
Sets have gaps in their indices, so this function translates a internal index to an logical index (ie. Nth element). NOTE: This is slow, do not use this for iteration!
Returns a uint8 pointer to the the Nth valid element in the set (skipping invalid entries). NOTE: This is slow, do not use this for iteration! Use CreateIterator() instead.
Returns a uint8 pointer to the the Nth valid element in the set (skipping invalid entries). NOTE: This is slow, do not use this for iteration! Use CreateIterator() instead.
|
inline |
Returns the property representing the element of the set
Returns a uint8 pointer to the element in the set.
| Iterator | A valid iterator of the item to return a pointer to. |
|
inline |
Returns a uint8 pointer to the element in the set.
| Iterator | A valid iterator of the item to return a pointer to. |
Returns a uint8 pointer to the element in the set.
| InternalIndex | index of the item to return a pointer to. |
|
inline |
Returns a uint8 pointer to the element in the set.
| InternalIndex | index of the item to return a pointer to. |
|
inline |
Returns the (non-inclusive) maximum index of elements in the set.
|
inline |
Index range check
| InternalIndex | Index to check |
Move the allocation from another set and make it our own.
| InOtherSet | The set to move the allocation from. |
|
inline |
Returns the number of elements in the set.
Static version of Num() used when you don't need to bother to construct a FScriptSetHelper. Returns the number of elements in the set.
| Target | Pointer to the raw memory associated with a FScriptSet |
|
inline |
Returns the number of elements in the set. Needed to allow reading of the num when the set is 'invalid' during its intrusive unset state.
| void FScriptSetHelper::Rehash | ( | ) |
Rehashes the keys in the set. This function must be called to create a valid set.
Removes an element at the specified index, destroying it.
| InternalIndex | The index of the element to remove. |
Removes the element from the set
|
friend |
| FProperty* FScriptSetHelper::ElementProp |
| FScriptSet* FScriptSetHelper::Set |
| FScriptSetLayout FScriptSetHelper::SetLayout |