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

#include <NestedVariant.h>

+ Inheritance diagram for TVariantMap< KeyType, ValueTypes >:

Public Types

using VariantType = TVariant< ValueTypes... >
 
using MapType = TMap< KeyType, VariantType >
 

Public Member Functions

template<typename ValueType , typename AddKeyType , typename VariantValueType = std::remove_cv_t<std::remove_reference_t<ValueType>>>
VariantValueTypeAddVariant (AddKeyType &&Key, ValueType &&Value)
 
template<typename ValueType >
void AddVariantMap (const TMap< KeyType, ValueType > &Map)
 
template<typename ValueType , typename GetKeyType >
bool GetVariant (const GetKeyType &Key, TSharedPtr< ValueType > &OutValue) const
 
template<typename ValueType , typename GetKeyType >
bool GetVariant (const GetKeyType &Key, ValueType &OutValue) const
 
template<typename ValueType >
bool GetVariantMap (TMap< KeyType, ValueType > &OutValue) const
 
- Public Member Functions inherited from TSharedFromThis< TVariantMap< KeyType, ValueTypes... > >
TSharedRef< TVariantMap< KeyType, ValueTypes... >, Mode > AsShared ()
 
TSharedRef< TVariantMap< KeyType, ValueTypes... > const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< TVariantMap< KeyType, ValueTypes... >, Mode > AsWeak ()
 
TWeakPtr< TVariantMap< KeyType, ValueTypes... > const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static TSharedRef< TVariantMap< KeyType, ValueTypes... > > CreateVariant ()
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< TVariantMap< KeyType, ValueTypes... > >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< TVariantMap< KeyType, ValueTypes... > >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

template<typename KeyType, typename... ValueTypes>
class TVariantMap< KeyType, ValueTypes >

TMap that holds a TVariant with helper functions for working with variant types.

Member Typedef Documentation

◆ MapType

template<typename KeyType , typename... ValueTypes>
using TVariantMap< KeyType, ValueTypes >::MapType = TMap<KeyType, VariantType>

◆ VariantType

template<typename KeyType , typename... ValueTypes>
using TVariantMap< KeyType, ValueTypes >::VariantType = TVariant<ValueTypes...>

Member Function Documentation

◆ AddVariant()

template<typename KeyType , typename... ValueTypes>
template<typename ValueType , typename AddKeyType , typename VariantValueType = std::remove_cv_t<std::remove_reference_t<ValueType>>>
VariantValueType & TVariantMap< KeyType, ValueTypes >::AddVariant ( AddKeyType &&  Key,
ValueType &&  Value 
)
inline

◆ AddVariantMap()

template<typename KeyType , typename... ValueTypes>
template<typename ValueType >
void TVariantMap< KeyType, ValueTypes >::AddVariantMap ( const TMap< KeyType, ValueType > &  Map)
inline

◆ CreateVariant()

template<typename KeyType , typename... ValueTypes>
static TSharedRef< TVariantMap< KeyType, ValueTypes... > > TVariantMap< KeyType, ValueTypes >::CreateVariant ( )
inlinestatic

◆ GetVariant() [1/2]

template<typename KeyType , typename... ValueTypes>
template<typename ValueType , typename GetKeyType >
bool TVariantMap< KeyType, ValueTypes >::GetVariant ( const GetKeyType &  Key,
TSharedPtr< ValueType > &  OutValue 
) const
inline

◆ GetVariant() [2/2]

template<typename KeyType , typename... ValueTypes>
template<typename ValueType , typename GetKeyType >
bool TVariantMap< KeyType, ValueTypes >::GetVariant ( const GetKeyType &  Key,
ValueType &  OutValue 
) const
inline

◆ GetVariantMap()

template<typename KeyType , typename... ValueTypes>
template<typename ValueType >
bool TVariantMap< KeyType, ValueTypes >::GetVariantMap ( TMap< KeyType, ValueType > &  OutValue) const
inline

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