![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UnrealType.h>
Inheritance diagram for FScriptMapHelper:Public Types | |
| using | FIterator = TScriptContainerIterator< FScriptMapHelper > |
Static Public Member Functions | |
| static FScriptMapHelper | CreateHelperFormInnerProperties (FProperty *InKeyProperty, FProperty *InValProperty, const void *InMap, EMapPropertyFlags InMapFlags=EMapPropertyFlags::None) |
Public Attributes | ||
| FProperty * | KeyProp | |
| FProperty * | ValueProp | |
| union { | ||
| FScriptMap * HeapMap | ||
| FFreezableScriptMap * FreezableMap | ||
| }; | ||
| FScriptMapLayout | MapLayout | |
| EMapPropertyFlags | MapFlags | |
Friends | |
| class | FMapProperty |
FScriptMapHelper: Pseudo dynamic map. Used to work with map properties in a sensible way. Note that map 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 FScriptMapHelper::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 |
| InMap | Pointer to raw memory that corresponds to this map. 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 map because all the keys will be default constructed, and the map needs rehashing.
Adds the (key, value) pair to the map, returning true if the element was added, or false if the element was already present and has been overwritten
|
inline |
Add an uninitialized value to the end of the map.
|
inlinestatic |
|
inline |
Remove all values from the map, calling destructors, etc as appropriate.
| Slack | used to presize the set for a subsequent add, to avoid reallocation. |
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! Use CreateIterator() instead.
Maps 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!
|
inline |
Finds the index of an element 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 the associated pair from hash, rather than linearly searching
Finds the associated pair from hash, rather than linearly searching
|
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. |
Returns a uint8 pointer to the the Nth valid key in the map (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 pair in the map (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 pair in the map (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 value in the map (skipping invalid entries). NOTE: This is slow, do not use this for iteration! Use CreateIterator() instead.
Finds or adds a new default-constructed value
No need to rehash after calling. The hash table must be properly hashed before calling.
Finds the associated value from hash, rather than linearly searching
|
inline |
Returns the property representing the key of the map pair.
Returns a uint8 pointer to the Key (first element) in the map. Currently identical to GetPairPtr, but provides clarity of purpose and avoids exposing implementation details of TMap.
| Iterator | A valid iterator of the item to return a pointer to. |
|
inline |
Returns a const uint8 pointer to the Key (first element) in the map. Currently identical to GetPairPtr, but provides clarity of purpose and avoids exposing implementation details of TMap.
| Iterator | A valid iterator of the item to return a pointer to. |
Returns a uint8 pointer to the Key (first element) in the map. Currently identical to GetPairPtr, but provides clarity of purpose and avoids exposing implementation details of TMap.
| InternalIndex | index of the item to return a pointer to. |
|
inline |
Returns the (non-inclusive) maximum index of elements in the map.
Returns a uint8 pointer to the pair in the map
| Iterator | A valid iterator of the item to return a pointer to. |
|
inline |
Returns a uint8 pointer to the pair in the map.
| Iterator | A valid iterator of the item to return a pointer to. |
|
inline |
Returns a uint8 pointer to the pair in the map.
| InternalIndex | index of the item to return a pointer to. |
Returns a uint8 pointer to the pair in the map
| InternalIndex | index of the item to return a pointer to. |
|
inline |
Returns the property representing the value of the map pair.
Returns a uint8 pointer to the Value (second element) in the map.
| Iterator | A valid iterator of the item to return a pointer to. |
|
inline |
Returns a const uint8 pointer to the Value (second element) in the map.
| Iterator | A valid iterator of the item to return a pointer to. |
Returns a uint8 pointer to the Value (second element) in the map.
| InternalIndex | index of the item to return a pointer to. |
|
inline |
Index range check
| InternalIndex | Index to check |
Move the allocation from another map and make it our own.
| InOtherMap | The map to move the allocation from. |
|
inline |
Returns the number of elements in the map.
|
inline |
Returns the number of elements in the map. Needed to allow reading of the num when the map is 'invalid' during its intrusive unset state.
| void FScriptMapHelper::Rehash | ( | ) |
Rehashes the keys in the map. This function must be called to create a valid map.
Removes an element at the specified index, destroying it.
| InternalIndex | The index of the element to remove. |
Removes the key and its associated value from the map
|
friend |
| union { ... } FScriptMapHelper |
| FFreezableScriptMap* FScriptMapHelper::FreezableMap |
| FScriptMap* FScriptMapHelper::HeapMap |
| FProperty* FScriptMapHelper::KeyProp |
| EMapPropertyFlags FScriptMapHelper::MapFlags |
| FScriptMapLayout FScriptMapHelper::MapLayout |
| FProperty* FScriptMapHelper::ValueProp |