|
| FORCENOINLINE void | OnInvalidMemoryImageAllocatorNum (int32 NewNum, SIZE_T NumBytesPerElement) |
| |
| UE_DISABLE_OPTIMIZATION_SHIP void | StripNegativeZero (double &InFloat) |
| |
| template<typename CompareType > |
| bool | MatchesWildcardRecursive (const UE_STRING_CHARTYPE *Target, int32 TargetLength, const UE_STRING_CHARTYPE *Wildcard, int32 WildcardLength, CompareType Compare) |
| |
| template<typename SrcCharType > |
| void | AppendCharacters (TArray< UE_STRING_CHARTYPE > &Out, const SrcCharType *Str, int32 Count) |
| |
| template<typename SrcCharType > |
| FORCEINLINE void | ConstructFromCString (TArray< UE_STRING_CHARTYPE > &Data, const SrcCharType *Src, int32 ExtraSlack) |
| |
| template<typename SrcCharType > |
| FORCEINLINE void | ConstructWithLength (TArray< UE_STRING_CHARTYPE > &Data, const SrcCharType *InSrc, int32 InCount, int32 ExtraSlack) |
| |
| template<typename SrcCharType > |
| FORCEINLINE void | ConstructWithSlack (TArray< UE_STRING_CHARTYPE > &Data, const SrcCharType *Src, int32 ExtraSlack) |
| |
| FORCEINLINE bool | IsValidCodepoint (const uint32 Codepoint) |
| |
| template<typename Pointer > |
| bool | IsRangeEmpty (Pointer &Ptr, int32 &Len) |
| |
| template<typename Pointer > |
| bool | IsRangeEmpty (Pointer &Ptr, FNullTerminal) |
| |
| template<typename Pointer > |
| void | PopFront (Pointer &Ptr, int32 &Len) |
| |
| template<typename Pointer > |
| void | PopFront (Pointer &Ptr, FNullTerminal) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const WIDECHAR *Source) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const WIDECHAR *Source, int32 SourceLen) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const UCS2CHAR *Source) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const UCS2CHAR *Source, int32 SourceLen) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const UTF32CHAR *Source) |
| |
| int32 | GetConvertedLength (const UTF8CHAR *, const UTF32CHAR *Source, int32 SourceLen) |
| |
| int32 | GetConvertedLength (const ANSICHAR *, const UTF8CHAR *Source) |
| |
| int32 | GetConvertedLength (const ANSICHAR *, const UTF8CHAR *Source, int32 SourceLen) |
| |
| int32 | GetConvertedLength (const WIDECHAR *, const UTF8CHAR *Source) |
| |
| int32 | GetConvertedLength (const WIDECHAR *, const UTF8CHAR *Source, int32 SourceLen) |
| |
| int32 | GetConvertedLength (const UCS2CHAR *, const UTF8CHAR *Source) |
| |
| int32 | GetConvertedLength (const UCS2CHAR *, const UTF8CHAR *Source, int32 SourceLen) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const WIDECHAR *Src) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const WIDECHAR *Src, int32 SrcLen) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const UCS2CHAR *Src) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const UCS2CHAR *Src, int32 SrcLen) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const UTF32CHAR *Src) |
| |
| UTF8CHAR * | Convert (UTF8CHAR *Dest, int32 DestLen, const UTF32CHAR *Src, int32 SrcLen) |
| |
| ANSICHAR * | Convert (ANSICHAR *Dest, int32 DestLen, const UTF8CHAR *Src) |
| |
| ANSICHAR * | Convert (ANSICHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen) |
| |
| WIDECHAR * | Convert (WIDECHAR *Dest, int32 DestLen, const UTF8CHAR *Src) |
| |
| WIDECHAR * | Convert (WIDECHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen) |
| |
| UCS2CHAR * | Convert (UCS2CHAR *Dest, int32 DestLen, const UTF8CHAR *Src) |
| |
| UCS2CHAR * | Convert (UCS2CHAR *Dest, int32 DestLen, const UTF8CHAR *Src, int32 SrcLen) |
| |
| CORE_API void | OnInvalidAnsiAllocatorNum (int32 NewNum, SIZE_T NumBytesPerElement) |
| |
| template<typename AllocatorType > |
| consteval EAllowShrinking | AllowShrinkingByDefault () |
| |
| template<typename AllocatorA , typename AllocatorB , typename OutAllocator , typename ProjectionType > |
| void | BitwiseBinaryOperatorImpl (const TBitArray< AllocatorA > &InA, const TBitArray< AllocatorB > &InB, TBitArray< OutAllocator > &OutResult, EBitwiseOperatorFlags InFlags, ProjectionType &&InProjection) |
| |
| template<typename OtherAllocator , typename OutAllocator , typename ProjectionType > |
| void | BitwiseOperatorImpl (const TBitArray< OtherAllocator > &InOther, TBitArray< OutAllocator > &OutResult, EBitwiseOperatorFlags InFlags, ProjectionType &&InProjection) |
| |
| CORE_API void | OnInvalidSetNum (unsigned long long NewNum) |
| |
| template<bool bFallback, typename AllocatorType > |
| consteval bool | ShrinkByDefaultOr () |
| |
| template<typename HashType > |
| void | CopyHash (HashType &Hash, int32 &HashSize, const HashType &Copy, int32 HashSizeCopy) |
| |
| template<typename HashType > |
| UE_FORCEINLINE_HINT FSetElementId & | GetTypedHash (HashType &Hash, int32 HashIndex, int32 HashSize) |
| |
| template<typename HashType > |
| void | Rehash (HashType &Hash, int32 HashSize) |
| |
| template<typename CharType , typename ArgType > |
| ArgType && | CheckCharType (ArgType &&Arg) |
| |
| template<typename... ArgTypes> |
| constexpr auto | StringViewGetData (ArgTypes &&... Args) -> decltype(GetData(Forward< ArgTypes >(Args)...)) |
| |
| template<UE::CCharType CharType> |
| constexpr int32 | StringLength (const CharType *InString) |
| |
| CORE_API void | OnInvalidConcurrentLinearArrayAllocatorNum (int32 NewNum, SIZE_T NumBytesPerElement) |
| |
| template<typename CharType > |
| void | CharTextStaticAssert () |
| |
| CORE_API int32 | Strlen32 (const UTF32CHAR *String) |
| |
| CORE_API void | OnInvalidMemStackAllocatorNum (int32 NewNum, SIZE_T NumBytesPerElement) |
| |
| const TCHAR * | GetBindingType (const TCHAR *Ptr) |
| |
| const FString & | GetBindingType (const FString &Str) |
| |
| const FStringView & | GetBindingType (const FStringView &StringView) |
| |
| template<typename T > |
| SIZE_T | EncodeIndices (const T &Variant) |
| |
| template<typename Variant0 , typename... Variants> |
| SIZE_T | EncodeIndices (const Variant0 &First, const Variants &... Rest) |
| |
| constexpr SIZE_T | DecodeIndex (SIZE_T EncodedIndex, SIZE_T VariantIndex, const SIZE_T *VariantSizes) |
| |
| template<typename... Ts> |
| UE_FORCEINLINE_HINT TVariantStorage< Ts... > & | CastToStorage (TVariant< Ts... > &Variant) |
| |
| template<typename... Ts> |
| UE_FORCEINLINE_HINT TVariantStorage< Ts... > && | CastToStorage (TVariant< Ts... > &&Variant) |
| |
| template<typename... Ts> |
| UE_FORCEINLINE_HINT const TVariantStorage< Ts... > & | CastToStorage (const TVariant< Ts... > &Variant) |
| |
| template<SIZE_T EncodedIndex, SIZE_T... VariantIndices, typename Func , typename... Variants> |
| decltype(auto) | VisitApplyEncoded (Func &&Callable, Variants &&... Args) |
| |
| template<typename Func , SIZE_T... EncodedIndices, SIZE_T... VariantIndices, typename... Variants> |
| decltype(auto) | VisitImpl (SIZE_T EncodedIndex, Func &&Callable, TIntegerSequence< SIZE_T, EncodedIndices... > &&, TIntegerSequence< SIZE_T, VariantIndices... > &&VariantIndicesSeq, Variants &&... Args) |
| |
| TOptional< FModuleManager > & | GetModuleManagerSingleton () |
| |
| template<typename OuterType , typename TargetType > |
| constexpr auto | DereferenceIfNecessary (TargetType &&Target, const volatile OuterType *TargetPtr) -> decltype((TargetType &&) Target) |
| |
| template<typename OuterType , typename TargetType > |
| constexpr auto | DereferenceIfNecessary (TargetType &&Target,...) -> decltype(*(TargetType &&) Target) |
| |
| template<typename RetType , typename... ArgTypes> |
| UE_REWRITE constexpr TOverloadWrapper< RetType, ArgTypes... > | MakeCallableObject (RetType(*Callable)(ArgTypes...)) |
| |
template<typename CallableType >
requires (!std::is_pointer_v<std::decay_t<CallableType>>) |
| UE_REWRITE constexpr CallableType && | MakeCallableObject (CallableType &&Callable) |
| |
| template<typename LhsType , bool bLhsStrength, typename RhsType , bool bRhsStrength UE_REQUIRES> |
| bool | operator== (const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs) |
| |
| template<typename LhsType , typename RhsType , bool bRhsStrength UE_REQUIRES> |
| bool | operator== (LhsType *Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs) |
| |
| template<typename LhsType , bool bLhsStrength, typename RhsType UE_REQUIRES> |
| bool | operator== (const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, RhsType *Rhs) |
| |
| template<typename LhsType , bool bLhsStrength, typename RhsType , bool bRhsStrength> |
| bool | operator!= (const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs) |
| |
| template<typename LhsType , typename RhsType , bool bRhsStrength> |
| bool | operator!= (LhsType *Lhs, const TPtrVariantBase< RhsType, bRhsStrength > &Rhs) |
| |
| template<typename LhsType , bool bLhsStrength, typename RhsType > |
| bool | operator!= (const TPtrVariantBase< LhsType, bLhsStrength > &Lhs, RhsType *Rhs) |
| |
| template<typename Class , typename MemberType > |
| constexpr bool | TIsMemberPointerToFunction (MemberType Class::*) |
| |
| template<typename ObjectType , ESPMode Mode> |
| UE_FORCEINLINE_HINT TSharedRef< ObjectType, Mode > | MakeSharedRef (ObjectType *InObject, SharedPointerInternals::TReferenceControllerBase< Mode > *InSharedReferenceCount) |
| |
| template<typename T > |
| constexpr auto | GetDataImpl (T &&Container) -> decltype(Container.GetData()) |
| |
| template<typename T > |
| constexpr auto | GetNumImpl (const T &Container) -> decltype(Container.Num()) |
| |
| template<typename SrcEncoding , typename DestEncoding > |
| constexpr bool | IsCharEncodingCompatibleWithImpl () |
| |
| template<typename SrcEncoding , typename DestEncoding > |
| constexpr bool | IsCharEncodingSimplyConvertibleToImpl () |
| |
| template<typename Encoding > |
| constexpr bool | IsFixedWidthEncodingImpl () |
| |
| template<> |
| struct | UE_DEPRECATED (5.3, "TScriptDelegate<FWeakObjectPtr> and TMulticastScriptDelegate<FWeakObjectPtr> have been deprecated, please use FScriptDelegate or FMulticastScriptDelegate respectively.") TScriptDelegateTraits< FWeakObjectPtr > |
| |
| template<typename From , typename To > |
| constexpr bool | BackwardCompatibilityCheck () |
| |
implementation
TAdderRef and TAdderReserverRef are type-erasing adapters that allow a function to add to (and reserve) a container without the function knowing about the specific type of the container. This allows the container and allocator to vary without having to change the function signature or make it a template.
Example:
void AddThree(TAdderRef<int32> Adder) { Adder.Add(3); }
void AddZeroToFour(TAdderReserverRef<int32> AdderReserver) { AdderReserver.Reserver(AdderReserver.Num() + 5); for (int Val = 0; Val != 5; ++Val) { AdderReserver.Add(Val); } }
TArray<int32, TInlineAllocator<10>> Arr; TSet<int32> Set;
AddThree(Arr); // Arr == { 3 } AddThree(Set); // Set == { 3 } AddZeroToFour(Arr); // Arr == { 3, 0, 1, 2, 3, 4 } AddZeroToFour(Set); // Set == { 3, 0, 1, 2, 4 } - only contains one 3 because it's a set
The inline allocation policy allocates up to a specified number of elements in the same allocation as the container. Any allocation needed beyond that causes all data to be moved into an indirect allocation. It always uses DEFAULT_ALIGNMENT.
Facilities to allow types to have an intrusive invalid state which can act as TOptional's 'unset' state, saving space. A class in such a state will only ever be compared against FIntrusiveUnsetOptionalState or destructed.
A class should implement a constructor taking FIntrusiveUnsetOptionalState, and an equality comparison operator against FIntrusiveUnsetOptionalState, which will put a class instance into the 'unset' state (in the case of the constructor) and allow testing of its unset state.
A public constexpr static data member of type bool called bHasIntrusiveUnsetOptionalState should be defined and set to true. There must also be a public typedef/alias called IntrusiveUnsetOptionalStateType and set to the type itself. This enables the optimization of this type within TOptional.
These functions should be public - regular user code will not be able to call them as they will not be able to construct an FIntrusiveUnsetOptionalState object to pass.
Example:
struct FMyType { // This static member should be constexpr, public and equal to true. static constexpr bool bHasIntrusiveUnsetOptionalState = true;
explicit FMyType(int32 InIndex) { // Validate class invariant. check(InIndex >= 0);
Index = InIndex; }
// This constructor will only ever be called by TOptional<FMyType> to enter its // 'unset' state. explicit FMyType(FIntrusiveUnsetOptionalState) { // Since negative indices are illegal as per the class invariant, we can use -1 // here as TOptional's 'unset' state, which no legal class instance will have. Index = -1; }
// This comparison function will only ever be called by TOptional to check if the // object is in the 'unset' state. It does not need to be commutative like most // comparison operators, nor is an operator!= necessary. bool operator==(FIntrusiveUnsetOptionalState) const { return Index == -1; }
private: // Non-negative indices are part of the class invariant. int32 Index; };
INTERNAL USE ONLY – Do not use this type. Its internal use case is for in-place construction of non-default-constructible types during serialization.
Module implementation boilerplate for regular modules.
This macro is used to expose a module's main class to the rest of the engine. You must use this macro in one of your modules C++ modules, in order for the 'InitializeModule' function to be declared in such a way that the engine can find it. Also, this macro will handle the case where a module is statically linked with the engine instead of dynamically loaded.
This macro is intended for modules that do NOT contain gameplay code. If your module does contain game classes, use IMPLEMENT_GAME_MODULE instead.
Usage: IMPLEMENT_MODULE(<My Module Class>, <Module name string>)
- See also
- IMPLEMENT_GAME_MODULE
Utilities for concepts checks.
In this case, a successful concept check means that a given C++ expression is well-formed. No guarantees are given about the correctness, behavior or complexity of the runtime behaviour of that expression.
Concepts are structs with a rather unusual definition:
struct CConcept { template <[...concept parameters...]> auto Requires([...placeholder variables...]) -> decltype(
[...expression(s) to test the validity of...]
); };
The prefix C is reserved for concepts, and concepts should be directly named as an adjective and not like a predicate, i.e.: CEqualityComparable - good CIsComparable - bad CHasEqualsOperator - bad
Concepts can be checked using the TModels_V trait or TModels traits class:
TModels_V<Concept, [...arguments...]> TModels<Concept, [...arguments...]>::Value
The arguments are forwarded to the template parameters of the concept's Requires() function, which will attempt to compile the expression(s) in the return value, and SFINAE is utilized to test whether that succeeded.
The placeholders are simply any variable declarations you need to write your expression(s).
Note that 'legal C++' doesn't necessarily mean that the expression will compile when used. The concept check only tests that the syntax is valid. Instantiation of function template bodies may still fail. See the CContainerLvalueAddable example below.
UE::Overload allows the combining of multiple invocables into a single object where they are overloaded.
Example:
TTuple<int32, FString, float> Tup1 = ...; TTuple<TArray<int32>, const UObject*, TCHAR> Tup2 = ...; VisitTupleElements( UE::Overload( [](int32 Int, const TArray<int32>& Arr) { // Called with (Tup1.Get<0>(), Tup2.Get<0>()) }, [Capture1](const FString& Str, const UObject* Obj) { // Called with (Tup1.Get<1>(), Tup2.Get<1>()) }, [Capture1, Capture2](float Val, TCHAR Ch) { // Called with (Tup1.Get<2>(), Tup2.Get<2>()) }, ) )
Warning:
All of the invocables' captured state is copied into the result. If the same capture is present in multiple callables, e.g. Capture1 above, the overload object will contain multiple copies of that capture.
Another pitfall is to capture-by-move multiple times - only one of the captures will be valid:
FString Name = ...; Visit( UE::Overload( [Name = MoveTemp(Name)](const FType1& Val1) { Val1.DoThing1(Name); // Either this... }, [Name = MoveTemp(Name)](const FType2& Val2) { Val2.DoThing2(Name); // ... or this will be an empty name. } ), Variant );
If these are problems, consider writing a bespoke struct with one copy of the capture with multiple operator() overloads.