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