TMap

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

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

Include

#include "Containers/Map.h"

Syntax

template<typename KeyType, typename ValueType, typename SetAllocator, typename KeyFuncs>
class TMap : public TSortableMapBase< KeyType, ValueType, 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

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=

(
    TMap&&
)

Public function

TMap &

 

operator=

(
    const TMap&
)

Typedefs

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback