TMap

A [TMapBase](API\Runtime\Core\Containers\TMapBase) specialization that only allows a single value associated with each key.

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Map.h

Include

#include "Containers/Map.h"

Syntax

template<typename InKeyType, typename InValueType, typename SetAllocator, typename KeyFuncs>
class TMap : public TSortableMapBase< InKeyType, InValueType, SetAllocator, KeyFuncs >

Remarks

A TMapBase specialization that only allows a single value associated with each key.

Constructors

Name Description

Public function

TMap()

Public function

TMap

(
    TMap&&
)

Public function

TMap

(
    const TMap&
)

Public function

TMap

(
    TMap< KeyType, ValueType, OtherSetA...
)

Constructor for moving elements from a TMap with a different SetAllocator

Public function

TMap

(
    const TMap< KeyType, ValueType, Oth...
)

Constructor for copying elements from a TMap with a different SetAllocator

Public function

TMap

(
    std::initializer_list< TPairInitial...
)

Constructor which gets its elements from a native initializer list

Functions

Name Description

Public function

void

 

Append

(
    TMap< KeyType, ValueType, OtherSetA...
)

Move all items from another map into our map (if any keys are in both, the value from the other map wins) and empty the other map.

Public function

void

 

Append

(
    const TMap< KeyType, ValueType, Oth...
)

Add all items from another map to our map (if any keys are in both, the value from the other map wins).

Public function

ValueType

 

FindAndRemoveChecked

(
    KeyConstPointerType Key
)

Find a pair with the specified key, removes it from the map, and returns the value part of the pair.

Public function

bool

 

RemoveAndCopyValue

(
    KeyInitType Key,
    ValueType& OutRemovedValue
)

Remove the pair with the specified key and copies the value that was removed to the ref parameter

Public function

bool

 

RemoveAndCopyValueByHash

(
    uint32 KeyHash,
    const ComparableKey& Key,
    ValueType& OutRemovedValue
)

See RemoveAndCopyValue() and class documentation section on ByHash() functions

Operators

Name Description

Public function

ValueType &

 

operator[]

(
    KeyConstPointerType Key
)

Public function Const

const ValueT...

 

operator[]

(
    KeyConstPointerType Key
)

Public function

TMap &

 

operator=

(
    std::initializer_list< TPairInitial...
)

Assignment operator which gets its elements from a native initializer list

Public function

TMap &

 

operator=

(
    const TMap< KeyType, ValueType, Oth...
)

Assignment operator for copying elements from a TMap with a different SetAllocator

Public function

TMap &

 

operator=

(
    TMap< KeyType, ValueType, OtherSetA...
)

Assignment operator for moving elements from a TMap with a different SetAllocator

Public function

TMap &

 

operator=

(
    const TMap&
)

Public function

TMap &

 

operator=

(
    TMap&&
)

Typedefs

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