UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMapBuilder< KeyType, ValueType, SetAllocator > Class Template Reference

#include <MapBuilder.h>

Public Member Functions

 TMapBuilder ()
 
template<typename OtherAllocator >
 TMapBuilder (const TMap< KeyType, ValueType, OtherAllocator > &InMap)
 
TMapBuilderAdd (KeyType InKey, ValueType InValue)
 
TMapBuilderAppend (const TMap< KeyType, ValueType, SetAllocator > &OtherMap)
 
TMap< KeyType, ValueType, SetAllocator > Build ()
 
 operator TMap< KeyType, ValueType, SetAllocator > ()
 

Detailed Description

template<typename KeyType, typename ValueType, typename SetAllocator = FDefaultSetAllocator>
class TMapBuilder< KeyType, ValueType, SetAllocator >

Template for fluent map builders.

Parameters
KeyTypeThe type of keys stored in the map.
ValueTypeThe type of values stored in the map.
SetAllocatorThe allocator to use for key-value pairs.

Constructor & Destructor Documentation

◆ TMapBuilder() [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMapBuilder< KeyType, ValueType, SetAllocator >::TMapBuilder ( )
inline

Default constructor.

◆ TMapBuilder() [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMapBuilder< KeyType, ValueType, SetAllocator >::TMapBuilder ( const TMap< KeyType, ValueType, OtherAllocator > &  InMap)
inline

Creates and initializes a new map builder from another map.

Parameters
InMapThe map to copy.

Member Function Documentation

◆ Add()

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMapBuilder & TMapBuilder< KeyType, ValueType, SetAllocator >::Add ( KeyType  InKey,
ValueType  InValue 
)
inline

Adds a key-value pair to the map.

Parameters
InKeyThe key of the pair to add.
InValueThe value of the pair to add.
Returns
This instance (for method chaining).

◆ Append()

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMapBuilder & TMapBuilder< KeyType, ValueType, SetAllocator >::Append ( const TMap< KeyType, ValueType, SetAllocator > &  OtherMap)
inline

Appends another map.

Parameters
OtherMapThe map to append.
Returns
This instance (for method chaining).

◆ Build()

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMap< KeyType, ValueType, SetAllocator > TMapBuilder< KeyType, ValueType, SetAllocator >::Build ( )
inline

Builds the map as configured.

Returns
A new map.

◆ operator TMap< KeyType, ValueType, SetAllocator >()

template<typename KeyType , typename ValueType , typename SetAllocator = FDefaultSetAllocator>
TMapBuilder< KeyType, ValueType, SetAllocator >::operator TMap< KeyType, ValueType, SetAllocator > ( )
inline

Implicit conversion operator to build the map as configured.

Returns
A new map.

The documentation for this class was generated from the following file: