Ark Server API (ASA) - Wiki
|
#include <TVariant.h>
Public Member Functions | |
TVariant () | |
template<typename U , typename... TArgs> | |
TVariant (TInPlaceType< U > &&, TArgs &&... Args) | |
TVariant (const TVariant &Other) | |
TVariant (TVariant &&Other) | |
TVariant & | operator= (const TVariant &Other) |
TVariant & | operator= (TVariant &&Other) |
~TVariant () | |
template<typename U > | |
bool | IsType () const |
template<typename U > | |
U & | Get () |
template<typename U > | |
const U & | Get () const |
template<typename U > | |
U * | TryGet () |
template<typename U > | |
const U * | TryGet () const |
template<typename U > | |
void | Set (typename TIdentity< U >::Type &&Value) |
template<typename U > | |
void | Set (const typename TIdentity< U >::Type &Value) |
template<typename U , typename... TArgs> | |
void | Emplace (TArgs &&... Args) |
SIZE_T | GetIndex () const |
Static Public Member Functions | |
template<typename U > | |
static constexpr SIZE_T | IndexOfType () |
Private Attributes | |
uint8 | TypeIndex |
Private Attributes inherited from UE::Core::Private::TVariantStorage< T, Ts... > | |
TAlignedBytes< SizeofValue, AlignofValue > | Storage |
Additional Inherited Members | |
Private Member Functions inherited from UE::Core::Private::TVariantStorage< T, Ts... > | |
auto & | GetValueAsIndexedType () & |
auto && | GetValueAsIndexedType () && |
const auto & | GetValueAsIndexedType () const & |
Static Private Member Functions inherited from UE::Core::Private::TVariantStorage< T, Ts... > | |
static constexpr SIZE_T | MaxOf (const SIZE_T Sizes[]) |
static constexpr SIZE_T | MaxSizeof () |
static constexpr SIZE_T | MaxAlignof () |
Static Private Attributes inherited from UE::Core::Private::TVariantStorage< T, Ts... > | |
static constexpr SIZE_T | SizeofValue |
static constexpr SIZE_T | AlignofValue |
A type-safe union based loosely on std::variant. This flavor of variant requires that all the types in the declaring template parameter pack be unique. Attempting to use the value of a Get() when the underlying type is different leads to undefined behavior.
Definition at line 33 of file TVariant.h.
Default initialize the TVariant to the first type in the parameter pack
Definition at line 43 of file TVariant.h.
|
inlineexplicit |
Perform in-place construction of a type into the variant
Definition at line 52 of file TVariant.h.
Copy construct the variant from another variant of the same type
Definition at line 62 of file TVariant.h.
Move construct the variant from another variant of the same type
Definition at line 69 of file TVariant.h.
Destruct the underlying type (if appropriate)
Definition at line 98 of file TVariant.h.
Set a specifically-typed value into the variant using in-place construction
Definition at line 167 of file TVariant.h.
Get a reference to the held value. Bad things can happen if this is called on a variant that does not hold the type asked for
Definition at line 113 of file TVariant.h.
Get a reference to the held value. Bad things can happen if this is called on a variant that does not hold the type asked for
Definition at line 126 of file TVariant.h.
Returns the currently held type's index into the template parameter pack
Definition at line 187 of file TVariant.h.
Lookup the index of a type in the template parameter pack at compile time.
Definition at line 179 of file TVariant.h.
Determine if the variant holds the specific type
Definition at line 105 of file TVariant.h.
Copy assign a variant from another variant of the same type
Definition at line 76 of file TVariant.h.
Move assign a variant from another variant of the same type
Definition at line 87 of file TVariant.h.
Set a specifically-typed value into the variant
Definition at line 160 of file TVariant.h.
Set a specifically-typed value into the variant
Definition at line 153 of file TVariant.h.
Get a pointer to the held value if the held type is the same as the one specified
Definition at line 134 of file TVariant.h.
Get a pointer to the held value if the held type is the same as the one specified
Definition at line 145 of file TVariant.h.
Index into the template parameter pack for the type held.
Definition at line 194 of file TVariant.h.