UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ContainersFwd.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "HAL/Platform.h"
6#include "CoreTypes.h"
8
10template<int IndexSize> class TSizedDefaultAllocator;
11template<int IndexSize> class TSizedNonshrinkingAllocator;
12template<typename ElementType, bool bInAllowDuplicateKeys = false> struct DefaultKeyFuncs;
13
20
21class FString;
22class FAnsiString;
23class FUtf8String;
24
25// FWideString is an alias for FString.
26//
27// This is so ANSICHAR/UTF8CHAR/WIDECHAR can be matched with FAnsiString/FUtf8String/FWideString when overloaded or specialized.
28//
29// FWideString should be the 'real' string class and FString should be the alias, but can't be for legacy reasons.
30// Forward declarations of FString expect it to be a class and changing it would affect ABIs and bloat PDBs.
31using FWideString = FString;
32
33template<> struct TIsContiguousContainer<FString> { static constexpr bool Value = true; };
34template<> struct TIsContiguousContainer<FAnsiString> { static constexpr bool Value = true; };
35template<> struct TIsContiguousContainer<FUtf8String> { static constexpr bool Value = true; };
36
37namespace UE::Core::Private
38{
39 template <typename CharType>
41
42 template <>
44 {
45 // TCHAR has been wide for too long to fix
46 static_assert(sizeof(TCHAR) == sizeof(WIDECHAR), "TCHAR is expected to be wide");
47 using Type = FWideString;
48 };
49
50 template <>
52 {
53 using Type = FAnsiString;
54 };
55
56 template <>
58 {
59 using Type = FUtf8String;
60 };
61}
62
63template <typename CharType>
64using TString = typename UE::Core::Private::TCharTypeToStringType<CharType>::Type;
65
66template<typename T, typename Allocator = FDefaultAllocator> class TArray;
67template<typename T> using TArray64 = TArray<T, FDefaultAllocator64>;
68template<typename T, typename SizeType = int32> class TArrayView;
69template<typename T> using TArrayView64 = TArrayView<T, int64>;
70template<typename T, typename SizeType = int32> using TConstArrayView = TArrayView<const T, SizeType>;
71template<typename T> using TConstArrayView64 = TConstArrayView<T, int64>;
72template<typename T> class TTransArray;
73template<typename InKeyType, typename InValueType, bool bInAllowDuplicateKeys> struct TDefaultMapHashableKeyFuncs;
74template<typename InKeyType, typename InValueType, typename SetAllocator = FDefaultSparseSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<InKeyType, InValueType, false> > class TSparseMap;
75template<typename InKeyType, typename InValueType, typename SetAllocator = FDefaultCompactSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<InKeyType, InValueType, false> > class TCompactMap;
76template<typename InKeyType, typename InValueType, typename SetAllocator = FDefaultSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<InKeyType, InValueType, false> > class TMap;
77template<typename KeyType, typename ValueType, typename SetAllocator = FDefaultSparseSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<KeyType, ValueType, true > > class TSparseMultiMap;
78template<typename KeyType, typename ValueType, typename SetAllocator = FDefaultCompactSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<KeyType, ValueType, true > > class TCompactMultiMap;
79template<typename KeyType, typename ValueType, typename SetAllocator = FDefaultSetAllocator, typename KeyFuncs = TDefaultMapHashableKeyFuncs<KeyType, ValueType, true > > class TMultiMap;
80template <typename T = void > struct TLess;
81template <typename> struct TTypeTraits;
83template <typename InElementType, typename ArrayAllocator = FDefaultAllocator, typename SortPredicate = TLess<InElementType>> class TSortedSet;
84template<typename InElementType, typename KeyFuncs = DefaultKeyFuncs<InElementType>, typename Allocator = FDefaultSparseSetAllocator> class TSparseSet;
85template<typename InElementType, typename KeyFuncs = DefaultKeyFuncs<InElementType>, typename Allocator = FDefaultCompactSetAllocator> class TCompactSet;
86template<typename InElementType, typename KeyFuncs = DefaultKeyFuncs<InElementType>, typename Allocator = FDefaultSetAllocator> class TSet;
87template<typename InElementType, typename InSizeType = int32> class TStridedView;
88template<typename T, typename SizeType = int32> using TConstStridedView = TStridedView<const T, SizeType>;
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::WIDECHAR WIDECHAR
A wide character. Normally a signed type.
Definition Platform.h:1133
FPlatformTypes::UTF8CHAR UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
Definition Platform.h:1137
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition ContainerAllocationPolicies.h:1643
Definition ContainerAllocationPolicies.h:1660
Definition ContainerAllocationPolicies.h:1642
Definition ArrayView.h:139
Definition Array.h:670
Definition UnrealString.h.inl:34
Definition ContainerAllocationPolicies.h:830
Definition ContainerAllocationPolicies.h:835
Definition SortedMap.h:20
Definition SortedSet.h:25
Definition StridedView.h:44
Definition TransArray.h:24
Type
Definition PawnAction_Move.h:11
implementation
Definition PlayInEditorLoadingScope.h:8
TSetG< ElementType, KeyType, TDefaultHashTraits< ElementType >, CHeapRawAllocator > TSet
Definition Set.h:87
Definition SetUtilities.h:36
Definition Map.h:111
Definition IsContiguousContainer.h:16
static constexpr bool Value
Definition IsContiguousContainer.h:20
Definition Less.h:19
Definition UnrealTypeTraits.h:347