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

Go to the source code of this file.

Classes

struct  UE::Core::Private::Tuple::TTupleBaseElement< T, Index, TupleSize >
 
struct  UE::Core::Private::Tuple::TTupleBaseElement< T, 0, 2 >
 
struct  UE::Core::Private::Tuple::TTupleElementGetterByIndex< Index, TupleSize >
 
struct  UE::Core::Private::Tuple::TTupleElementGetterByIndex< 0, 2 >
 
struct  UE::Core::Private::Tuple::TTupleElementGetterByType< Type, TupleSize >
 
struct  UE::Core::Private::Tuple::FEqualityHelper< ArgCount, ArgToCompare >
 
struct  UE::Core::Private::Tuple::FEqualityHelper< ArgCount, ArgCount >
 
struct  UE::Core::Private::Tuple::TLessThanHelper< NumArgs, ArgToCompare, Last >
 
struct  UE::Core::Private::Tuple::TLessThanHelper< NumArgs, ArgToCompare, true >
 
struct  UE::Core::Private::Tuple::TLessThanHelper< NumArgs, NumArgs, false >
 
struct  UE::Core::Private::Tuple::TTupleBase< TIntegerSequence< uint32, Indices... >, Types... >
 
struct  UE::Core::Private::Tuple::TTransformTuple_Impl< TIntegerSequence< uint32, Indices... > >
 
struct  UE::Core::Private::Tuple::TVisitTupleElements_Impl< TIntegerSequence< uint32, Indices... > >
 
struct  UE::Core::Private::Tuple::TCVTupleArity< const volatile TTuple< Types... > >
 
struct  UE::Core::Private::Tuple::TCVTupleIndex< Type, TupleType >
 
struct  UE::Core::Private::Tuple::TCVTupleIndex< Type, const volatile TTuple< TupleTypes... > >
 
struct  UE::Core::Private::Tuple::TCVTupleElement< Index, TupleType >
 
struct  UE::Core::Private::Tuple::TCVTupleElement< Index, const volatile TTuple< TupleTypes... > >
 
struct  UE::Core::Private::Tuple::TGetTupleHashHelper< ArgToCombine, ArgCount >
 
struct  UE::Core::Private::Tuple::TGetTupleHashHelper< ArgIndex, ArgIndex >
 
struct  TTuple< Types >
 
struct  TTupleArity< TupleType >
 
struct  TIsTuple< T >
 

Namespaces

namespace  UE
 
namespace  UE::Core
 
namespace  UE::Core::Private
 
namespace  UE::Core::Private::Tuple
 
namespace  Freeze
 

Macros

#define UE_TUPLE_STATIC_ANALYSIS_WORKAROUND   0
 
#define UE_TUPLE_STRUCTURED_BINDING_SUPPORT   0
 

Typedefs

template<typename Type , typename TupleType >
using TTupleIndex = UE::Core::Private::Tuple::TCVTupleIndex<Type, const volatile TupleType>
 
template<uint32 Index, typename TupleType >
using TTupleElement = UE::Core::Private::Tuple::TCVTupleElement<Index, const volatile TupleType>
 

Enumerations

enum  UE::Core::Private::Tuple::EForwardingConstructor { UE::Core::Private::Tuple::ForwardingConstructor }
 
enum  UE::Core::Private::Tuple::EOtherTupleConstructor { UE::Core::Private::Tuple::OtherTupleConstructor }
 

Functions

template<typename... Types>
TTuple< std::decay_t< Types >... > MakeTuple (Types &&... Args)
 
template<typename... ArgTypes>
void UE::Core::Private::Tuple::ConceptCheckingHelper (ArgTypes &&...)
 
template<typename LhsType , typename RhsType , uint32... Indices, decltype(ConceptCheckingHelper((DeclVal< LhsType & >().template Get< Indices >()=DeclVal< RhsType && >().template Get< Indices >(), 0)...)) * = nullptr>
static void UE::Core::Private::Tuple::Assign (LhsType &Lhs, RhsType &&Rhs, TIntegerSequence< uint32, Indices... >)
 
template<typename... ElementTypes, typename... Types>
FORCEINLINE TTuple< ElementTypes... > UE::Core::Private::Tuple::MakeTupleImpl (Types &&... Args)
 
template<typename... Given, typename... Deduced>
std::enable_if_t< std::conjunction_v< std::is_constructible< Given, Deduced && >... > > UE::Core::Private::Tuple::ConstructibleConceptCheck (Deduced &&...)
 
template<typename... Given, typename... Deduced>
decltype(ConceptCheckingHelper((DeclVal< Given >()=DeclVal< Deduced && >(), 0)...)) UE::Core::Private::Tuple::AssignableConceptCheck (Deduced &&...)
 
template<typename... Types>
FORCEINLINE uint32 GetTypeHash (const TTuple< Types... > &Tuple)
 
FORCEINLINE uint32 GetTypeHash (const TTuple<> &Tuple)
 
template<typename KeyType , typename ValueType >
void Freeze::IntrinsicWriteMemoryImage (FMemoryImageWriter &Writer, const TTuple< KeyType, ValueType > &Object, const FTypeLayoutDesc &)
 
template<typename KeyType , typename ValueType >
uint32 Freeze::IntrinsicUnfrozenCopy (const FMemoryUnfreezeContent &Context, const TTuple< KeyType, ValueType > &Object, void *OutDst)
 
template<typename KeyType , typename ValueType >
uint32 Freeze::IntrinsicAppendHash (const TTuple< KeyType, ValueType > *DummyObject, const FTypeLayoutDesc &TypeDesc, const FPlatformTypeLayoutParameters &LayoutParams, FSHA1 &Hasher)
 
template<typename KeyType , typename ValueType >
uint32 Freeze::IntrinsicGetTargetAlignment (const TTuple< KeyType, ValueType > *DummyObject, const FTypeLayoutDesc &TypeDesc, const FPlatformTypeLayoutParameters &LayoutParams)
 
 DECLARE_TEMPLATE_INTRINSIC_TYPE_LAYOUT ((template< typename KeyType, typename ValueType >),(TTuple< KeyType, ValueType >))
 
template<typename... Types>
FORCEINLINE TTuple< std::decay_t< Types >... > MakeTuple (Types &&... Args)
 
template<typename... Types>
FORCEINLINE TTuple< Types &&... > ForwardAsTuple (Types &&... Args)
 
template<typename FuncType , typename... Types>
FORCEINLINE decltype(autoTransformTuple (TTuple< Types... > &&Tuple, FuncType Func)
 
template<typename FuncType , typename... Types>
FORCEINLINE decltype(autoTransformTuple (const TTuple< Types... > &Tuple, FuncType Func)
 
template<typename FuncType , typename FirstTupleType , typename... TupleTypes>
FORCEINLINE void VisitTupleElements (FuncType &&Func, FirstTupleType &&FirstTuple, TupleTypes &&... Tuples)
 
template<typename... Types>
FORCEINLINE TTuple< Types &... > Tie (Types &... Args)
 
template<typename... Types>
FORCEINLINE FArchiveoperator<< (FArchive &Ar, TTuple< Types... > &Tuple)
 
template<typename... Types>
FORCEINLINE void operator<< (FStructuredArchive::FSlot Slot, TTuple< Types... > &Tuple)
 

Variables

template<typename T , typename... Types>
constexpr uint32 UE::Core::Private::Tuple::TTypeCountInParameterPack_V = 0
 
template<typename T , typename U , typename... Types>
constexpr uint32 UE::Core::Private::Tuple::TTypeCountInParameterPack_V< T, U, Types... > = TTypeCountInParameterPack_V<T, Types...> + (std::is_same_v<T, U> ? 1 : 0)
 
template<typename T >
constexpr bool TIsTuple_V = false
 
template<typename... Types>
constexpr bool TIsTuple_V< TTuple< Types... > > = true
 
template<typename... Types>
constexpr bool TIsTuple_V< const TTuple< Types... > > = true
 
template<typename... Types>
constexpr bool TIsTuple_V< volatile TTuple< Types... > > = true
 
template<typename... Types>
constexpr bool TIsTuple_V< const volatile TTuple< Types... > > = true
 

Macro Definition Documentation

◆ UE_TUPLE_STATIC_ANALYSIS_WORKAROUND

#define UE_TUPLE_STATIC_ANALYSIS_WORKAROUND   0

Definition at line 37 of file Tuple.h.

◆ UE_TUPLE_STRUCTURED_BINDING_SUPPORT

#define UE_TUPLE_STRUCTURED_BINDING_SUPPORT   0

Definition at line 43 of file Tuple.h.

Typedef Documentation

◆ TTupleElement

Traits class which gets the element type of a TTuple with the given index. If the index is out of range, a compile error is generated.

Given Index = 1, and Tuple = TTuple<int, float, char>, TTupleElement<Index, Tuple>::Type will be float.

Definition at line 844 of file Tuple.h.

◆ TTupleIndex

Traits class which gets the tuple index of a given type from a given TTuple. If the type doesn't appear, or appears more than once, a compile error is generated.

Given Type = char, and Tuple = TTuple<int, float, char>, TTupleIndex<Type, Tuple>::Value will be 2.

Definition at line 833 of file Tuple.h.

Function Documentation

◆ DECLARE_TEMPLATE_INTRINSIC_TYPE_LAYOUT()

DECLARE_TEMPLATE_INTRINSIC_TYPE_LAYOUT ( (template< typename KeyType, typename ValueType >) ,
(TTuple< KeyType, ValueType >)  )

◆ ForwardAsTuple()

template<typename... Types>
FORCEINLINE TTuple< Types &&... > ForwardAsTuple ( Types &&... Args)

Makes a TTuple from some arguments. Unlike MakeTuple, the TTuple element types are references and retain the same value category of the arguments, like the Forward function.

Parameters
ArgsThe arguments used to construct the tuple.
Returns
A tuple containing forwarded references to the arguments.

Example:

template <typename... Ts> void Foo(const TTuple<Ts...>&);

void Func(const int32 A, FString&& B) { // Calls Foo<const int32&, const TCHAR(&)[6], FString&&>(...); Foo(ForwardAsTuple(A, TEXT("Hello"), MoveTemp(B))); }

Definition at line 888 of file Tuple.h.

◆ GetTypeHash() [1/2]

template<typename... Types>
FORCEINLINE uint32 GetTypeHash ( const TTuple< Types... > & Tuple)

Definition at line 771 of file Tuple.h.

◆ GetTypeHash() [2/2]

FORCEINLINE uint32 GetTypeHash ( const TTuple<> & Tuple)

Definition at line 776 of file Tuple.h.

◆ MakeTuple() [1/2]

template<typename... Types>
TTuple< std::decay_t< Types >... > MakeTuple ( Types &&... Args)

Makes a TTuple from some arguments. The type of the TTuple elements are the decayed versions of the arguments.

Parameters
ArgsThe arguments used to construct the tuple.
Returns
A tuple containing a copy of the arguments.

Example:

void Func(const int32 A, FString&& B) { // Equivalent to: // TTuple<int32, const TCHAR*, FString> MyTuple(A, TEXT("Hello"), MoveTemp(B)); auto MyTuple = MakeTuple(A, TEXT("Hello"), MoveTemp(B)); }

Definition at line 863 of file Tuple.h.

◆ MakeTuple() [2/2]

template<typename... Types>
FORCEINLINE TTuple< std::decay_t< Types >... > MakeTuple ( Types &&... Args)

Makes a TTuple from some arguments. The type of the TTuple elements are the decayed versions of the arguments.

Parameters
ArgsThe arguments used to construct the tuple.
Returns
A tuple containing a copy of the arguments.

Example:

void Func(const int32 A, FString&& B) { // Equivalent to: // TTuple<int32, const TCHAR*, FString> MyTuple(A, TEXT("Hello"), MoveTemp(B)); auto MyTuple = MakeTuple(A, TEXT("Hello"), MoveTemp(B)); }

Definition at line 863 of file Tuple.h.

◆ operator<<() [1/2]

template<typename... Types>
FORCEINLINE FArchive & operator<< ( FArchive & Ar,
TTuple< Types... > & Tuple )

Definition at line 1008 of file Tuple.h.

◆ operator<<() [2/2]

template<typename... Types>
FORCEINLINE void operator<< ( FStructuredArchive::FSlot Slot,
TTuple< Types... > & Tuple )

Definition at line 1015 of file Tuple.h.

◆ Tie()

template<typename... Types>
FORCEINLINE TTuple< Types &... > Tie ( Types &... Args)

Tie function for structured unpacking of tuples into individual variables.

Example:

TTuple<FString, float, TArray<int32>> SomeFunction();

FString Ret1; float Ret2; TArray<int32> Ret3;

Tie(Ret1, Ret2, Ret3) = SomeFunction();

// Now Ret1, Ret2 and Ret3 contain the unpacked return values.

Definition at line 968 of file Tuple.h.

◆ TransformTuple() [1/2]

template<typename FuncType , typename... Types>
FORCEINLINE decltype(auto) TransformTuple ( const TTuple< Types... > & Tuple,
FuncType Func )

Definition at line 922 of file Tuple.h.

◆ TransformTuple() [2/2]

template<typename FuncType , typename... Types>
FORCEINLINE decltype(auto) TransformTuple ( TTuple< Types... > && Tuple,
FuncType Func )

Creates a new TTuple by applying a functor to each of the elements.

Parameters
TupleThe tuple to apply the functor to.
FuncThe functor to apply.
Returns
A new tuple of the transformed elements.

Example:

float Overloaded(int32 Arg); char Overloaded(const TCHAR* Arg); const TCHAR* Overloaded(const FString& Arg);

void Func(const TTuple<int32, const TCHAR*, FString>& MyTuple) { // Equivalent to: // TTuple<float, char, const TCHAR*> TransformedTuple(Overloaded(MyTuple.Get<0>()), Overloaded(MyTuple.Get<1>()), Overloaded(MyTuple.Get<2>()))); auto TransformedTuple = TransformTuple(MyTuple, [](const auto& Arg) { return Overloaded(Arg); }); }

Definition at line 916 of file Tuple.h.

◆ VisitTupleElements()

template<typename FuncType , typename FirstTupleType , typename... TupleTypes>
FORCEINLINE void VisitTupleElements ( FuncType && Func,
FirstTupleType && FirstTuple,
TupleTypes &&... Tuples )

Visits each element in the specified tuples in parallel and applies them as arguments to the functor. All specified tuples must have the same number of elements.

Parameters
FuncThe functor to apply.
TuplesThe tuples whose elements are to be applied to the functor.

Example:

void Func(const TTuple<int32, const TCHAR*, FString>& Tuple1, const TTuple<bool, float, FName>& Tuple2) { // Equivalent to: // Functor(Tuple1.Get<0>(), Tuple2.Get<0>()); // Functor(Tuple1.Get<1>(), Tuple2.Get<1>()); // Functor(Tuple1.Get<2>(), Tuple2.Get<2>()); VisitTupleElements(Functor, Tuple1, Tuple2); }

Definition at line 947 of file Tuple.h.

Variable Documentation

◆ TIsTuple_V

template<typename T >
constexpr bool TIsTuple_V = false
constexpr

Definition at line 994 of file Tuple.h.

◆ TIsTuple_V< const TTuple< Types... > >

template<typename... Types>
constexpr bool TIsTuple_V< const TTuple< Types... > > = true
constexpr

Definition at line 997 of file Tuple.h.

◆ TIsTuple_V< const volatile TTuple< Types... > >

template<typename... Types>
constexpr bool TIsTuple_V< const volatile TTuple< Types... > > = true
constexpr

Definition at line 999 of file Tuple.h.

◆ TIsTuple_V< TTuple< Types... > >

template<typename... Types>
constexpr bool TIsTuple_V< TTuple< Types... > > = true
constexpr

Definition at line 996 of file Tuple.h.

◆ TIsTuple_V< volatile TTuple< Types... > >

template<typename... Types>
constexpr bool TIsTuple_V< volatile TTuple< Types... > > = true
constexpr

Definition at line 998 of file Tuple.h.