TMultiMap

A [TMapBase](API\Runtime\Core\Containers\TMapBase) specialization that allows multiple values to be 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 TMultiMap : public TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >

Remarks

A TMapBase specialization that allows multiple values to be associated with each key.

Constructors

Name Description

Public function

TMultiMap()

Public function

TMultiMap

(
    TMultiMap&&
)

Public function

TMultiMap

(
    const TMultiMap&
)

Public function

TMultiMap

(
    TMultiMap< KeyType, ValueType, Othe...
)

Constructor for moving elements from a TMap with a different SetAllocator

Public function

TMultiMap

(
    const TMultiMap< KeyType, ValueType...
)

Constructor for copying elements from a TMap with a different SetAllocator

Public function

TMultiMap

(
    std::initializer_list< TPairInitial...
)

Constructor which gets its elements from a native initializer list

Functions

Name Description

Public function

ValueType &

 

AddUnique

(
    const KeyType& InKey,
    const ValueType& InValue
)

Add a key-value association to the map.

Public function

ValueType &

 

AddUnique

(
    const KeyType& InKey,
    ValueType&& InValue
)

Public function

ValueType &

 

AddUnique

(
    KeyType&& InKey,
    const ValueType& InValue
)

Public function

ValueType &

 

AddUnique

(
    KeyType&& InKey,
    ValueType&& InValue
)

Public function

void

 

Append

(
    TMultiMap< KeyType, ValueType, Othe...
)

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 TMultiMap< KeyType, ValueType...
)

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 &

 

EmplaceUnique

(
    InitKeyType&& InKey,
    InitValueType&& InValue
)

Add a key-value association to the map.

Public function Const

const ValueT...

 

FindPair

(
    KeyInitType Key,
    ValueInitType Value
)

Find an association between a specified key and value. (const)

Public function

ValueType &#...

 

FindPair

(
    KeyInitType Key,
    ValueInitType Value
)

Find an association between a specified key and value.

Public function Const

void

 

MultiFind

(
    KeyInitType Key,
    TArray< ValueType, Allocator >& Ou...,
    bool bMaintainOrder
)

Finds all values associated with the specified key.

Public function Const

void

 

MultiFindPointer

(
    KeyInitType Key,
    TArray< const ValueType*, Allo...,
    bool bMaintainOrder
)

Finds all values associated with the specified key.

Public function

void

 

MultiFindPointer

(
    KeyInitType Key,
    TArray< ValueType*, Allocator ...,
    bool bMaintainOrder
)

Public function Const

int32

 

Num

(
    KeyInitType Key
)

Returns the number of values within this map associated with the specified key

Public function Const

int32

 

Num()

Since we implement an overloaded Num() function in TMultiMap, we need to reimplement TMapBase::Num to make it visible.

Public function

int32

 

Remove

(
    KeyConstPointerType InKey
)

Remove all value associations for a key.

Public function

int32

 

Remove

(
    KeyInitType InKey,
    ValueInitType InValue
)

Remove associations between the specified key and value from the map.

Public function

int32

 

RemoveSingle

(
    KeyInitType InKey,
    ValueInitType InValue
)

Remove the first association between the specified key and value from the map.

Operators

Name Description

Public function

TMultiMap &

 

operator=

(
    TMultiMap&&
)

Public function

TMultiMap &

 

operator=

(
    const TMultiMap&
)

Public function

TMultiMap &

 

operator=

(
    TMultiMap< KeyType, ValueType, Othe...
)

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

Public function

TMultiMap &

 

operator=

(
    const TMultiMap< KeyType, ValueType...
)

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

Public function

TMultiMap &

 

operator=

(
    std::initializer_list< TPairInitial...
)

Assignment operator which gets its elements from a native initializer list

Typedefs

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