FScriptSetHelper: Pseudo dynamic Set. 更多...
#include <UnrealType.h>
被 FScriptSetHelper_InContainer 继承.
Public 成员函数 | |
| int32 | AddDefaultValue_Invalid_NeedsRehash () |
| Adds a blank, constructed value to a given size. 更多... | |
| 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 | |
| FORCEINLINE int32 | AddUninitializedValue () |
| Add an uninitialized value to the end of the set. 更多... | |
| void | EmptyElements (int32 Slack=0) |
| Remove all values from the set, calling destructors, etc as appropriate. 更多... | |
| int32 | FindElementIndex (const void *ElementToFind, int32 IndexHint=0) const |
| Finds the index of an element in a set 更多... | |
| FORCEINLINE int32 | FindElementIndexFromHash (const void *ElementToFind) const |
| Finds element index from hash, rather than linearly searching | |
| FORCEINLINE uint8 * | FindElementPtr (const void *ElementToFind, int32 IndexHint=0) |
| Finds the pair in a map which matches the key in another pair. 更多... | |
| FORCEINLINE uint8 * | FindElementPtrFromHash (const void *ElementToFind) |
| Finds element pointer from hash, rather than linearly searching | |
| int32 | FindInternalIndex (int32 LogicalIdx) const |
| Maps have gaps in their indices, so this function translates a logical index (ie. 更多... | |
| FORCEINLINE | FScriptSetHelper (const FSetProperty *InProperty, const void *InSet) |
| Constructor, brings together a property and an instance of the property located in memory 更多... | |
| FProperty * | GetElementProperty () const |
| Returns the property representing the element of the set | |
| FORCEINLINE uint8 * | GetElementPtr (int32 Index) |
| Returns a uint8 pointer to the element in the set. 更多... | |
| FORCEINLINE const uint8 * | GetElementPtr (int32 Index) const |
| Returns a uint8 pointer to the element in the set. 更多... | |
| FORCEINLINE int32 | GetMaxIndex () const |
| Returns the (non-inclusive) maximum index of elements in the set. 更多... | |
| bool | HasElement (void *InBaseAddress, const FString &InElementValue) const |
| Checks if an element has already been added to the set 更多... | |
| FORCEINLINE bool | IsValidIndex (int32 Index) const |
| Index range check 更多... | |
| void | MoveAssign (void *InOtherSet) |
| Move the allocation from another set and make it our own. 更多... | |
| FORCEINLINE int32 | Num () const |
| Returns the number of elements in the set. 更多... | |
| COREUOBJECT_API void | Rehash () |
| Rehashes the keys in the set. 更多... | |
| void | RemoveAt (int32 Index, int32 Count=1) |
| Removes an element at the specified index, destroying it. 更多... | |
| bool | RemoveElement (const void *ElementToRemove) |
| Removes the element from the set | |
静态 Public 成员函数 | |
| static FORCEINLINE int32 | Num (const void *Target) |
| Static version of Num() used when you don't need to bother to construct a FScriptSetHelper. 更多... | |
FScriptSetHelper: Pseudo dynamic Set.
Used to work with Set properties in a sensible way.
|
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 |
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.
|
inline |
Add an uninitialized value to the end of the set.
|
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. |
|
inline |
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. |
|
inline |
Maps 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!
|
inline |
Returns a uint8 pointer to the element in the set.
| Index | index of the item to return a pointer to. |
|
inline |
Returns a uint8 pointer to the element in the set.
| Index | index of the item to return a pointer to. |
|
inline |
Returns the (non-inclusive) maximum index of elements in the set.
|
inline |
Checks if an element has already been added to the set
| InBaseAddress | The base address of the set |
| InElementValue | The element value to check for |
|
inline |
Index range check
| Index | Index to check |
|
inline |
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.
|
inlinestatic |
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 |
| COREUOBJECT_API void FScriptSetHelper::Rehash | ( | ) |
Rehashes the keys in the set.
This function must be called to create a valid set.
|
inline |
Removes an element at the specified index, destroying it.
| Index | The index of the element to remove. |