Navigation
API > API/Runtime > API/Runtime/CoreUObject
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
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 | FScriptMapHelper |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UnrealType.h |
| Include Path | #include "UObject/UnrealType.h" |
Syntax
class FScriptMapHelper
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScriptMapHelper
(
EInternal, |
UObject/UnrealType.h | ||
FScriptMapHelper
(
FProperty* InKeyProp, |
UObject/UnrealType.h | ||
FScriptMapHelper
(
const FMapProperty* InProperty, |
Constructor, brings together a property and an instance of the property located in memory | UObject/UnrealType.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FIterator | TScriptContainerIterator< FScriptMapHelper > | UObject/UnrealType.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FreezableMap | FFreezableScriptMap * | UObject/UnrealType.h | ||
| FScriptMapHelper | union FScriptMapHelper | UObject/UnrealType.h | ||
| HeapMap | FScriptMap * | UObject/UnrealType.h | ||
| KeyProp | FProperty * | UObject/UnrealType.h | ||
| MapFlags | EMapPropertyFlags | UObject/UnrealType.h | ||
| MapLayout | FScriptMapLayout | UObject/UnrealType.h | ||
| ValueProp | FProperty * | 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 AddPair
(
const void* KeyPtr, |
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 | UObject/UnrealType.h | |
int32 AddUninitializedValue() |
Add an uninitialized value to the end of the map. | UObject/UnrealType.h | |
FIterator CreateIterator
(
const int32 InLogicalIndex |
UObject/UnrealType.h | ||
FIterator CreateIterator () |
UObject/UnrealType.h | ||
void EmptyValues
(
int32 Slack |
Remove all values from the map, calling destructors, etc as appropriate. | UObject/UnrealType.h | |
int32 FindInternalIndex
(
int32 LogicalIdx |
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. | UObject/UnrealType.h | |
int32 FindLogicalIndex
(
int32 InternalIdx |
Maps have gaps in their indices, so this function translates a internal index to an logical index (ie. Nth element). | UObject/UnrealType.h | |
int32 FindMapIndexWithKey
(
const void* PairWithKeyToFind, |
Finds the index of an element in a map which matches the key in another pair. | UObject/UnrealType.h | |
int32 FindMapPairIndexFromHash
(
const void* KeyPtr |
Finds the associated pair from hash, rather than linearly searching | UObject/UnrealType.h | |
uint8 * FindMapPairPtrFromHash
(
const void* KeyPtr |
Finds the associated pair from hash, rather than linearly searching | UObject/UnrealType.h | |
uint8 * FindMapPairPtrWithKey
(
const void* PairWithKeyToFind, |
Finds the pair in a map which matches the key in another pair. | UObject/UnrealType.h | |
uint8 * FindNthKeyPtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid key in the map (skipping invalid entries). | UObject/UnrealType.h | |
const uint8 * FindNthPairPtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid pair in the map (skipping invalid entries). | UObject/UnrealType.h | |
uint8 * FindNthPairPtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid pair in the map (skipping invalid entries). | UObject/UnrealType.h | |
uint8 * FindNthValuePtr
(
int32 N |
Returns a uint8 pointer to the the Nth valid value in the map (skipping invalid entries). | UObject/UnrealType.h | |
void * FindOrAdd
(
const void* KeyPtr |
Finds or adds a new default-constructed value | UObject/UnrealType.h | |
uint8 * FindValueFromHash
(
const void* KeyPtr |
Finds the associated value from hash, rather than linearly searching | UObject/UnrealType.h | |
FProperty * GetKeyProperty() |
Returns the property representing the key of the map pair. | UObject/UnrealType.h | |
const uint8 * GetKeyPtr
(
const FIterator Iterator |
Returns a const uint8 pointer to the Key (first element) in the map. | UObject/UnrealType.h | |
uint8 * GetKeyPtr
(
const FIterator Iterator |
Returns a uint8 pointer to the Key (first element) in the map. | UObject/UnrealType.h | |
uint8 * GetKeyPtr
(
int32 InternalIndex |
Returns a uint8 pointer to the Key (first element) in the map. | UObject/UnrealType.h | |
int32 GetMaxIndex() |
Returns the (non-inclusive) maximum index of elements in the map. | UObject/UnrealType.h | |
uint8 * GetPairPtr
(
int32 InternalIndex |
Returns a uint8 pointer to the pair in the map | UObject/UnrealType.h | |
uint8 * GetPairPtr
(
const FIterator Iterator |
Returns a uint8 pointer to the pair in the map | UObject/UnrealType.h | |
const uint8 * GetPairPtr
(
const FIterator Iterator |
Returns a uint8 pointer to the pair in the map. | UObject/UnrealType.h | |
const uint8 * GetPairPtr
(
const int32 InternalIndex |
Returns a uint8 pointer to the pair in the map. | UObject/UnrealType.h | |
FProperty * GetValueProperty() |
Returns the property representing the value of the map pair. | UObject/UnrealType.h | |
uint8 * GetValuePtr
(
int32 InternalIndex |
Returns a uint8 pointer to the Value (second element) in the map. | UObject/UnrealType.h | |
uint8 * GetValuePtr
(
const FIterator Iterator |
Returns a uint8 pointer to the Value (second element) in the map. | UObject/UnrealType.h | |
const uint8 * GetValuePtr
(
const FIterator Iterator |
Returns a const uint8 pointer to the Value (second element) in the map. | UObject/UnrealType.h | |
bool IsValidIndex
(
int32 InternalIndex |
Index range check | UObject/UnrealType.h | |
void MoveAssign
(
void* InOtherMap |
Move the allocation from another map and make it our own. | UObject/UnrealType.h | |
int32 Num() |
Returns the number of elements in the map. | UObject/UnrealType.h | |
int32 NumUnchecked () |
Returns the number of elements in the map. | UObject/UnrealType.h | |
void Rehash() |
Rehashes the keys in the map. This function must be called to create a valid map. | UObject/UnrealType.h | |
void RemoveAt
(
int32 InternalIndex, |
Removes an element at the specified index, destroying it. | UObject/UnrealType.h | |
bool RemovePair
(
const void* KeyPtr |
Removes the key and its associated value from the map | UObject/UnrealType.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FScriptMapHelper CreateHelperFormInnerProperties
(
FProperty* InKeyProperty, |
UObject/UnrealType.h |