UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyHelper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreTypes.h"
5#include "Logging/LogMacros.h"
6#include "UObject/NameTypes.h"
14
15#include "PropertyHelper.generated.h"
16
17class FProperty;
18class UField;
19class UFunction;
20class UObject;
21
24
25UENUM()
27{
28};
29
35COREUOBJECT_API void SkipWhitespace(const TCHAR*& Str);
36
48
54{
55 FDeltaIndexHelper() = default;
56
59
62
64 void Increment(int32 NewIndex)
65 {
66 LastIndex = NewIndex;
67 }
68
71
72 int32 LastIndex = -1; // Start at -1 so index 0 can be serialized as delta=1 (so that 0 can be reserved for 'no more')
73 int32 LastIndexFull = -1; // Separate index for full state since it will never be rolled back
74};
75
77{
89 COREUOBJECT_API const TCHAR* ImportDelegateFromText( FScriptDelegate& Delegate, const UFunction* SignatureFunction, const TCHAR* Buffer, UObject* Parent, FOutputDevice* ErrorText );
90}
91
92namespace UE
93{
94
96
97template <typename T>
99{
100 return (T*)FindObjectByTypePath(T::StaticClass(), TypePath);
101}
102
103#if WITH_EDITORONLY_DATA
104inline const FName NAME_OriginalType(ANSITEXTVIEW("OriginalType"));
105const FString* FindOriginalTypeName(const UField* Field);
106const FString* FindOriginalTypeName(const FProperty* Property);
107FPropertyTypeName FindOriginalType(const UField* Field);
108FPropertyTypeName FindOriginalType(const FProperty* Property);
109#endif // WITH_EDITORONLY_DATA
110
121FPropertyTypeName ApplyRedirectsToPropertyType(FPropertyTypeName OldTypeName, const FProperty* Property = nullptr);
122
127{
128public:
130 {
131 #if WITH_EDITORONLY_DATA
132 if (InContext->bTrackSerializedPropertyPath)
133 {
134 Context = InContext;
135 Context->SerializedPropertyPath.Push(InSegment);
136 }
137 #endif
138 }
139
141 {
142 #if WITH_EDITORONLY_DATA
143 if (Context)
144 {
145 Context->SerializedPropertyPath.Pop();
146 }
147 #endif
148 }
149
152
153private:
154 FUObjectSerializeContext* Context = nullptr;
155};
156
157} // UE
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UENUM(...)
Definition ObjectMacros.h:749
COREUOBJECT_API bool AreInstancedObjectsIdentical(UObject *ObjectA, UObject *ObjectB, uint32 PortFlags)
Definition PropertyHelper.cpp:32
EFallbackEnum
Definition PropertyHelper.h:27
COREUOBJECT_API void SkipWhitespace(const TCHAR *&Str)
Definition PropertyHelper.cpp:24
#define ANSITEXTVIEW(str)
Definition StringView.h:555
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition NameTypes.h:617
Definition OutputDevice.h:133
Definition UnrealType.h:174
Definition ScriptDelegates.h:66
Definition Class.h:3793
Definition PropertyTypeName.h:46
Definition PropertyHelper.h:127
FSerializedPropertyPathScope & operator=(const FSerializedPropertyPathScope &)=delete
FSerializedPropertyPathScope(const FSerializedPropertyPathScope &)=delete
~FSerializedPropertyPathScope()
Definition PropertyHelper.h:140
FSerializedPropertyPathScope(FUObjectSerializeContext *InContext, const FPropertyPathNameSegment &InSegment)
Definition PropertyHelper.h:129
Definition Class.h:181
Definition Class.h:2476
Definition Object.h:95
Definition PropertyHelper.h:77
COREUOBJECT_API const TCHAR * ImportDelegateFromText(FScriptDelegate &Delegate, const UFunction *SignatureFunction, const TCHAR *Buffer, UObject *Parent, FOutputDevice *ErrorText)
Definition PropertyHelper.cpp:137
Definition FieldSystemNoiseAlgo.cpp:6
Definition AdvancedWidgetsModule.cpp:13
UObject * FindObjectByTypePath(UClass *Class, FPropertyTypeName TypePath)
Definition PropertyHelper.cpp:293
FPropertyTypeName ApplyRedirectsToPropertyType(FPropertyTypeName OldTypeName, const FProperty *Property)
Definition PropertyHelper.cpp:615
U16 Index
Definition radfft.cpp:71
Definition PropertyHelper.h:54
FDeltaIndexHelper()=default
int32 LastIndex
Definition PropertyHelper.h:72
COREUOBJECT_API void SerializeEarlyEnd(FArchive &Ar)
Definition PropertyHelper.cpp:129
void Increment(int32 NewIndex)
Definition PropertyHelper.h:64
COREUOBJECT_API bool SerializeNext(FArchive &Ar, int32 &Index)
Definition PropertyHelper.cpp:92
int32 LastIndexFull
Definition PropertyHelper.h:73
Definition UObjectThreadContext.h:140
Definition PropertyPathName.h:23