Navigation
API > API/Runtime > API/Runtime/Core
A TMapBase specialization that only allows a single value associated with each key.
| Name | TMap |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Map.h |
| Include Path | #include "Containers/Map.h" |
Syntax
template<typename InKeyType, typename InValueType, typename SetAllocator, typename KeyFuncs>
class TMap : public TSortableMapBase< InKeyType, InValueType, SetAllocator, KeyFuncs >
Inheritance Hierarchy
- TMapBase → TSortableMapBase → TMap
- TMap
Derived Classes
TMap derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMap
(
std::initializer_list< TPairInitializer< const KeyType&, const ValueType& > > InitList |
Constructor which gets its elements from a native initializer list | Containers/Map.h | |
TMap () |
Containers/Map.h | ||
| Containers/Map.h | |||
| Containers/Map.h | |||
| Constructor for moving elements from a TMap with a different SetAllocator | Containers/Map.h | ||
| Constructor for copying elements from a TMap with a different SetAllocator | Containers/Map.h | ||
TMap
(
FIntrusiveUnsetOptionalState Tag |
Containers/Map.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| IntrusiveUnsetOptionalStateType | TMap | Containers/Map.h | |
| KeyConstPointerType | Super::KeyConstPointerType | Containers/Map.h | |
| KeyFuncsType | KeyFuncs | Containers/Map.h | |
| KeyInitType | Super::KeyInitType | Containers/Map.h | |
| KeyType | InKeyType | Containers/Map.h | |
| SetAllocatorType | SetAllocator | Containers/Map.h | |
| Super | TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > | Containers/Map.h | |
| ValueType | InValueType | Containers/Map.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bHasIntrusiveUnsetOptionalState | bool | Start - intrusive TOptional |
Containers/Map.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| 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. | Containers/Map.h | ||
| Add all items from another map to our map (if any keys are in both, the value from the other map wins). | Containers/Map.h | ||
ValueType FindAndRemoveChecked
(
KeyConstPointerType Key |
Find a pair with the specified key, removes it from the map, and returns the value part of the pair. | Containers/Map.h | |
bool RemoveAndCopyValue
(
KeyInitType Key, |
Remove the pair with the specified key and copies the value that was removed to the ref parameter | Containers/Map.h | |
bool RemoveAndCopyValueByHash
(
uint32 KeyHash, |
See RemoveAndCopyValue() and class documentation section on ByHash() functions | Containers/Map.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ValueType & operator[]
(
KeyConstPointerType Key |
Containers/Map.h | ||
const ValueType & operator[]
(
KeyConstPointerType Key |
Containers/Map.h | ||
TMap & operator=
(
std::initializer_list< TPairInitializer< const KeyType&, const ValueType& > > InitList |
Assignment operator which gets its elements from a native initializer list | Containers/Map.h | |
| Assignment operator for copying elements from a TMap with a different SetAllocator | Containers/Map.h | ||
| End - intrusive TOptional |
Containers/Map.h | ||
| Containers/Map.h | |||
| Containers/Map.h | |||
bool operator==
(
FIntrusiveUnsetOptionalState Tag |
Containers/Map.h |