Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Tuple.h File Reference
#include "../BasicTypes.h"
#include "AreTypesEqual.h"
#include "UnrealTemplate.h"
#include "Decay.h"
#include "../Delegates/IntegerSequence.h"
+ 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  UE4Tuple_Private::TNthTypeFromParameterPack< N, T, OtherTypes... >
 
struct  UE4Tuple_Private::TNthTypeFromParameterPack< 0, T, OtherTypes... >
 
struct  UE4Tuple_Private::TDecayedFrontOfParameterPackIsSameType< T, Types >
 
struct  UE4Tuple_Private::TTupleElement< T, Index >
 
struct  UE4Tuple_Private::TTupleElementHelperImpl< IterIndex, Index, ElementType, Types... >
 
struct  UE4Tuple_Private::TTupleElementHelperImpl< Index, Index, ElementType, Types... >
 
struct  UE4Tuple_Private::TTupleElementHelper< WantedIndex, Types >
 
struct  UE4Tuple_Private::FEqualityHelper< ArgCount, ArgToCompare >
 
struct  UE4Tuple_Private::FEqualityHelper< ArgCount, ArgCount >
 
struct  UE4Tuple_Private::TLessThanHelper< NumArgs, ArgToCompare, Last >
 
struct  UE4Tuple_Private::TLessThanHelper< NumArgs, ArgToCompare, true >
 
struct  UE4Tuple_Private::TLessThanHelper< NumArgs, NumArgs, false >
 
struct  UE4Tuple_Private::TTupleStorage< TIntegerSequence< uint32, Indices... >, Types... >
 
struct  UE4Tuple_Private::TTupleStorage< TIntegerSequence< uint32, 0, 1 >, InKeyType, InValueType >
 
struct  UE4Tuple_Private::TTupleStorage< TIntegerSequence< uint32, 0, 1 >, InKeyType, InValueType >::TGetHelper< 0, Dummy >
 
struct  UE4Tuple_Private::TTupleStorage< TIntegerSequence< uint32, 0, 1 >, InKeyType, InValueType >::TGetHelper< 1, Dummy >
 
struct  UE4Tuple_Private::TTupleImpl< TIntegerSequence< uint32, Indices... >, Types... >
 
struct  UE4Tuple_Private::TTransformTuple_Impl< TIntegerSequence< uint32, Indices... > >
 
struct  UE4Tuple_Private::TVisitTupleElements_Impl< TIntegerSequence< uint32, Indices... > >
 
struct  UE4Tuple_Private::TCVTupleArity< const volatile TTuple< Types... > >
 
struct  TTuple< Types >
 
struct  TTupleArity< TupleType >
 

Namespaces

namespace  UE4Tuple_Private
 

Macros

#define USE_TUPLE_AUTO_RETURN_TYPES   1
 
#define TUPLES_USE_DEFAULTED_FUNCTIONS   1
 

Functions

template<typename... Types>
TTuple< typename TDecay< Types >::Type... > MakeTuple (Types &&... Args)
 
template<typename FuncType , typename... Types>
FORCEINLINE decltype(auto) TransformTuple (TTuple< Types... > &&Tuple, FuncType Func)
 
template<typename FuncType , typename... Types>
FORCEINLINE decltype(auto) TransformTuple (const TTuple< Types... > &Tuple, FuncType Func)
 
template<typename TupleType , typename FuncType >
FORCEINLINE void VisitTupleElements (TupleType &Tuple, FuncType Func)
 

Macro Definition Documentation

◆ TUPLES_USE_DEFAULTED_FUNCTIONS

#define TUPLES_USE_DEFAULTED_FUNCTIONS   1

Definition at line 18 of file Tuple.h.

◆ USE_TUPLE_AUTO_RETURN_TYPES

#define USE_TUPLE_AUTO_RETURN_TYPES   1

Definition at line 15 of file Tuple.h.

Function Documentation

◆ MakeTuple()

template<typename... Types>
TTuple< typename TDecay< Types >::Type... > 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 656 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 695 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 685 of file Tuple.h.

◆ VisitTupleElements()

template<typename TupleType , typename FuncType >
FORCEINLINE void VisitTupleElements ( TupleType & Tuple,
FuncType Func )

Visits each element in the tuple in turn and applies the supplied functor to it.

Parameters
TupleThe tuple to apply the functor to.
FuncThe functor to apply.

Definition at line 711 of file Tuple.h.