Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TVariant.h File Reference
+ Include dependency graph for TVariant.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TInPlaceType< T >
 
struct  FEmptyVariantState
 
class  TVariant< T, Ts >
 
struct  TIsVariant< T >
 
struct  TIsVariant< TVariant< Ts... > >
 
struct  TIsVariant< T & >
 
struct  TIsVariant< T && >
 
struct  TIsVariant< const T >
 
struct  TVariantSize< TVariant< Ts... > >
 
struct  TVariantSize< T & >
 
struct  TVariantSize< T && >
 
struct  TVariantSize< const T >
 

Functions

template<typename Func , typename... Variants, typename = typename TEnableIf<UE::Core::Private::TIsAllVariant<typename TDecay<Variants>::Type...>::Value>::Type>
decltype(autoVisit (Func &&Callable, Variants &&... Args)
 
template<typename... Ts>
FArchiveoperator<< (typename UE::Core::Private::TAlwaysFArchive< TVariant< Ts... > >::Type &Ar, TVariant< Ts... > &Variant)
 

Function Documentation

◆ operator<<()

template<typename... Ts>
FArchive & operator<< ( typename UE::Core::Private::TAlwaysFArchive< TVariant< Ts... > >::Type & Ar,
TVariant< Ts... > & Variant )
inline

Serialization function for TVariants.

In order for a TVariant to be serializable, each type in its template parameter pack must:

  1. Have a default constructor. This is required because when reading the type from an archive, it must be default constructed before being loaded.
  2. Implement the FArchive& operator<<(FArchive&, T&) function. This is required to serialize the actual type that's stored in TVariant.

Definition at line 259 of file TVariant.h.

◆ Visit()

template<typename Func , typename... Variants, typename = typename TEnableIf<UE::Core::Private::TIsAllVariant<typename TDecay<Variants>::Type...>::Value>::Type>
decltype(auto) Visit ( Func && Callable,
Variants &&... Args )

Apply a visitor function to the list of variants

Definition at line 233 of file TVariant.h.

+ Here is the call graph for this function: