FScriptMapHelper

[FScriptMapHelper](API\Runtime\CoreUObject\UObject\FScriptMapHelper): Pseudo dynamic map.

Windows
MacOS
Linux

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.

Variables

Name Description

Public variable

union FScriptMa...

 

@663

Public variable

FFreezableScrip...

 

FreezableMap

Public variable

FScriptMap *...

 

HeapMap

Public variable

FProperty *

 

KeyProp

Public variable

EMapPropertyFla...

 

MapFlags

Public variable

FScriptMapLayou...

 

MapLayout

Public variable

FProperty *

 

ValueProp

Constructors

Name Description

Public function

FScriptMapHelper

(
    const FMapProperty* InProperty,
    const void* InMap
)

Constructor, brings together a property and an instance of the property located in memory

Functions

Name Description

Public function

int32

 

AddDefaultValue_Invalid_NeedsRehash()

Adds a blank, constructed value to a given size.

Public function

void

 

AddPair

(
    const void* KeyPtr,
    const void* ValuePtr
)

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

Public function

int32

 

AddUninitializedValue()

Add an uninitialized value to the end of the map.

Public function Static

FScriptMapHe...

 

CreateHelperFormInnerProperties

(
    FProperty* InKeyProperty,
    FProperty* InValProperty,
    const void* InMap,
    EMapPropertyFlags InMapFlags
)

Public function Const

FScriptMapHe...

 

CreateIterator()

Public function

void

 

EmptyValues

(
    int32 Slack
)

Remove all values from the map, calling destructors, etc as appropriate.

Public function Const

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.

Public function Const

int32

 

FindMapIndexWithKey

(
    const void* PairWithKeyToFind,
    int32 IndexHint
)

Finds the index of an element in a map which matches the key in another pair.

Public function

uint8 *

 

FindMapPairPtrFromHash

(
    const void* KeyPtr
)

Finds the associated pair from hash, rather than linearly searching

Public function

uint8 *

 

FindMapPairPtrWithKey

(
    const void* PairWithKeyToFind,
    int32 IndexHint
)

Finds the pair in a map which matches the key in another pair.

Public function

void *

 

FindOrAdd

(
    const void* KeyPtr
)

Finds or adds a new default-constructed value

Public function

uint8 *

 

FindValueFromHash

(
    const void* KeyPtr
)

Finds the associated value from hash, rather than linearly searching

Public function Const

FProperty &#...

 

GetKeyProperty()

Returns the property representing the key of the map pair.

Public function

uint8 *

 

GetKeyPtr

(
    int32 Index
)

Returns a uint8 pointer to the Key (first element) in the map.

Public function Const

int32

 

GetMaxIndex()

Returns the (non-inclusive) maximum index of elements in the map.

Public function

uint8 *

 

GetPairPtr

(
    int32 Index
)

Returns a uint8 pointer to the pair in the map

Public function Const

const uint8 ...

 

GetPairPtr

(
    int32 Index
)

Returns a uint8 pointer to the pair in the map.

Public function Const

FProperty &#...

 

GetValueProperty()

Returns the property representing the value of the map pair.

Public function

uint8 *

 

GetValuePtr

(
    int32 Index
)

Returns a uint8 pointer to the Value (second element) in the map.

Public function Const

bool

 

HasKey

(
    const void* InBaseAddress,
    const FString& InKeyValue
)

Checks if a key in the map matches the specified key

Public function Const

bool

 

IsValidIndex

(
    int32 Index
)

Index range check

Public function

void

 

MoveAssign

(
    void* InOtherMap
)

Move the allocation from another map and make it our own.

Public function Const

int32

 

Num()

Returns the number of elements in the map.

Public function

void

 

Rehash()

Rehashes the keys in the map. This function must be called to create a valid map.

Public function

void

 

RemoveAt

(
    int32 Index,
    int32 Count
)

Removes an element at the specified index, destroying it.

Public function

bool

 

RemovePair

(
    const void* KeyPtr
)

Removes the key and its associated value from the map

Classes

Name

Description

Public class

FIterator

Enums

Name

Description

Private enum

EInternal

Deprecated Functions

Name Description

Public function Static

int32

 

Num

(
    const void* Target
)

This shortcut is no longer valid - the Num() should be read from a proper map helper

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss