|
| template<typename... Types> |
| constexpr TTuple< std::decay_t< Types >... > | MakeTuple (Types &&... Args) |
| |
| template<typename... ElementTypes, typename... Types> |
| UE_FORCEINLINE_HINT constexpr TTuple< ElementTypes... > | UE::Core::Private::Tuple::MakeTupleImpl (Types &&... Args) |
| |
| template<typename... Types> |
| UE_FORCEINLINE_HINT uint32 | GetTypeHash (const TTuple< Types... > &Tuple) |
| |
| UE_FORCEINLINE_HINT 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> |
| UE_FORCEINLINE_HINT constexpr TTuple< std::decay_t< Types >... > | MakeTuple (Types &&... Args) |
| |
| template<typename... Types> |
| UE_FORCEINLINE_HINT TTuple< Types &&... > | ForwardAsTuple (Types &&... Args) |
| |
| template<typename FuncType , typename... Types> |
| UE_FORCEINLINE_HINT decltype(auto) | TransformTuple (TTuple< Types... > &&Tuple, FuncType Func) |
| |
| template<typename FuncType , typename... Types> |
| UE_FORCEINLINE_HINT decltype(auto) | TransformTuple (const TTuple< Types... > &Tuple, FuncType Func) |
| |
| template<typename FuncType , typename FirstTupleType , typename... TupleTypes> |
| UE_FORCEINLINE_HINT void | VisitTupleElements (FuncType &&Func, FirstTupleType &&FirstTuple, TupleTypes &&... Tuples) |
| |
| template<typename... Types> |
| UE_FORCEINLINE_HINT TTuple< Types &... > | Tie (Types &... Args) |
| |
template<int N, typename TupleType >
requires (TIsTuple_V<std::decay_t<TupleType>>) |
| decltype(auto) | get (TupleType &&val) |
| |
| template<typename... Types> |
| FArchive & | operator<< (FArchive &Ar, TTuple< Types... > &Tuple) |
| |
| template<typename... Types> |
| UE_FORCEINLINE_HINT void | operator<< (FStructuredArchive::FSlot Slot, TTuple< Types... > &Tuple) |
| |
template<typename... Types>
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
-
| Args | The 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))); }
template<typename... Types>
Makes a TTuple from some arguments. The type of the TTuple elements are the decayed versions of the arguments.
- Parameters
-
| Args | The 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)); }
template<typename... Types>
Makes a TTuple from some arguments. The type of the TTuple elements are the decayed versions of the arguments.
- Parameters
-
| Args | The 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)); }
template<typename... Types>
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.
template<
typename FuncType , typename... Types>
Creates a new TTuple by applying a functor to each of the elements.
- Parameters
-
| Tuple | The tuple to apply the functor to. |
| Func | The 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); }); }
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
-
| Func | The functor to apply. |
| Tuples | The 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); }