UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyPathHelpersTest.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Logging/LogMacros.h"
9#include "PropertyPathHelpersTest.generated.h"
10
12
13UENUM()
21
22USTRUCT()
30
31USTRUCT(BlueprintType)
33{
35
37 {
38 Float = -1.5f;
39 Bool = true;
40 EnumOne = Four;
41 EnumTwo = Four;
43 EnumFour = Four;
44 Integer = -1;
45 String = "Destructed";
46 }
47
48 UPROPERTY()
49 float Float = 0.5f;
50
51 UPROPERTY()
52 bool Bool = false;
53
54 UPROPERTY()
56
57 UPROPERTY()
59
60 UPROPERTY()
62
63 UPROPERTY()
65
66 UPROPERTY()
68
69 UPROPERTY()
70 FString String = "Default";
71
72 bool operator ==(const FPropertyPathTestInnerStruct& Other) const
73 {
74 return Bool == Other.Bool
75 && Integer == Other.Integer
76 && EnumOne == Other.EnumOne
77 && EnumTwo == Other.EnumTwo
78 && EnumThree == Other.EnumThree
79 && EnumFour == Other.EnumFour
80 && String == Other.String
81 && Float == Other.Float;
82 }
83
85 {
86 return !(*this == Other);
87 }
88};
89
90USTRUCT(BlueprintType)
92{
94
96 {
97 Float = -1.5f;
98 Bool = true;
99 EnumOne = Two;
100 EnumTwo = Two;
101 EnumThree = Two;
102 EnumFour = Two;
103 Integer = -1;
104 String = "Destructed";
105 }
106
107 UPROPERTY()
109
110 UPROPERTY()
112
113 UPROPERTY()
115
116 UPROPERTY()
118
119 UPROPERTY()
121
122 UPROPERTY()
124
125 UPROPERTY()
126 FString String = "Default";
127
128 UPROPERTY()
129 float Float = 0.0f;
130
131 UPROPERTY()
133
134 UPROPERTY()
136
137 bool operator ==(const FPropertyPathTestStruct& Other) const
138 {
139 return Bool == Other.Bool
140 && Integer == Other.Integer
141 && EnumOne == Other.EnumOne
142 && EnumTwo == Other.EnumTwo
143 && EnumThree == Other.EnumThree
144 && EnumFour == Other.EnumFour
145 && String == Other.String
146 && Float == Other.Float
147 && InnerStruct == Other.InnerStruct;
148 }
149
151 {
152 return !(*this == Other);
153 }
154};
155
156UCLASS()
158{
160
161public:
162
164 {
165 Float = -1.5f;
166 Bool = true;
167 EnumOne = Two;
168 EnumTwo = Two;
169 EnumThree = Two;
170 EnumFour = Two;
171 Integer = -1;
172 String = "Destructed";
173 }
174
175 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PropertyPathHelpersTest")
177
178 UPROPERTY(EditDefaultsOnly, Category = "PropertyPathHelpersTest")
180
181 UPROPERTY(EditDefaultsOnly, Category = "PropertyPathHelpersTest")
183
184 UPROPERTY(EditDefaultsOnly, Category = "PropertyPathHelpersTest")
186
187 UPROPERTY(EditDefaultsOnly, Category = "PropertyPathHelpersTest")
189
190 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PropertyPathHelpersTest")
192
193 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "PropertyPathHelpersTest")
194 FString String = "Default";
195
196 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Getter, Setter, Category = "PropertyPathHelpersTest")
197 float Float = 0.0f;
198
199 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Getter, Setter, Category = "PropertyPathHelpersTest")
201
202 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Getter, Setter, Category = "PropertyPathHelpersTest")
204
205 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Getter, Setter, Category = "PropertyPathHelpersTest")
207
208 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "PropertyPathHelpersTest")
210
211public:
212
213 UFUNCTION()
214 void SetFloat(float InFloat)
215 {
216 bSetterCalled = true;
217 Float = InFloat;
218 }
219
220 UFUNCTION()
222 {
223 bGetterCalled = true;
224 return Float;
225 }
226
227 UFUNCTION()
229 {
230 bSetterCalled = true;
232 }
233
234 UFUNCTION()
236 {
237 bGetterCalled = true;
238 return Struct;
239 }
240
241 UFUNCTION()
243 {
244 bSetterCalled = true;
246 }
247
248 UFUNCTION()
250 {
251 bGetterCalled = true;
252 return StructRef;
253 }
254
255 UFUNCTION()
257 {
258 bSetterCalled = true;
260 }
261
262 UFUNCTION()
264 {
265 bGetterCalled = true;
266 return StructConstRef;
267 }
268
269public:
270
272 {
273 return Bool == Other.Bool
274 && Integer == Other.Integer
275 && EnumOne == Other.EnumOne
276 && EnumTwo == Other.EnumTwo
277 && EnumThree == Other.EnumThree
278 && EnumFour == Other.EnumFour
279 && String == Other.String
280 && Float == Other.Float
281 && Struct == Other.Struct
282 && StructRef == Other.StructRef
283 && StructConstRef == Other.StructConstRef
284 && bSetterCalled == Other.bSetterCalled
285 && bGetterCalled == Other.bGetterCalled
286 && InnerObject ? (*InnerObject == *Other.InnerObject) : true;
287 }
288
290 {
291 return !(*this == Other);
292 }
293
294 bool IsSetterCalled() const
295 {
296 return bSetterCalled;
297 }
298
299 bool IsGetterCalled() const
300 {
301 return bGetterCalled;
302 }
303
305 {
306 bSetterCalled = false;
307 bGetterCalled = false;
308 }
309
310private:
311
312 mutable bool bSetterCalled = false;
313 mutable bool bGetterCalled = false;
314};
315
316USTRUCT()
318{
320
322 {
325 Object->Struct.InnerObject = NewObject<UPropertyPathTestObject>();
326 Object->StructRef.InnerObject = NewObject<UPropertyPathTestObject>();
327 Object->StructConstRef.InnerObject = NewObject<UPropertyPathTestObject>();
328
329 ModifiedStruct = {};
330
331 ModifiedStruct.Bool = true;
332 ModifiedStruct.Integer = 1;
333 ModifiedStruct.EnumOne = Two;
334 ModifiedStruct.EnumTwo = Two;
335 ModifiedStruct.EnumThree = Two;
336 ModifiedStruct.EnumFour = Two;
337 ModifiedStruct.String = "NewValue";
338 ModifiedStruct.Float = 1.5f;
339
340 ModifiedStruct.InnerStruct.Bool = true;
341 ModifiedStruct.InnerStruct.Integer = 1;
342 ModifiedStruct.EnumOne = Four;
343 ModifiedStruct.EnumTwo = Four;
344 ModifiedStruct.EnumThree = Four;
345 ModifiedStruct.EnumFour = Four;
346 ModifiedStruct.InnerStruct.String = "NewValue";
347 ModifiedStruct.InnerStruct.Float = 1.5f;
348
349 DefaultStruct = {};
350
351 ModifiedObject = NewObject<UPropertyPathTestObject>();
352
353 ModifiedObject->Bool = true;
354 ModifiedObject->Integer = 1;
355 ModifiedObject->EnumOne = Two;
356 ModifiedObject->EnumTwo = Two;
357 ModifiedObject->EnumThree = Two;
358 ModifiedObject->EnumFour = Two;
359 ModifiedObject->String = "NewValue";
360 ModifiedObject->Float = 1.5f;
361 }
362
363 UPROPERTY()
365
366 UPROPERTY()
368
369 UPROPERTY()
371
372 UPROPERTY()
374};
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
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
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
EPropertyPathTestEnum
Definition PropertyPathHelpersTest.h:15
@ Three
Definition PropertyPathHelpersTest.h:18
@ Four
Definition PropertyPathHelpersTest.h:19
@ Two
Definition PropertyPathHelpersTest.h:17
@ One
Definition PropertyPathHelpersTest.h:16
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
Definition EnumAsByte.h:22
Definition Object.h:95
Definition PropertyPathHelpersTest.h:158
FPropertyPathTestStruct StructConstRef
Definition PropertyPathHelpersTest.h:206
TEnumAsByte< EPropertyPathTestEnum > EnumOne
Definition PropertyPathHelpersTest.h:179
TEnumAsByte< EPropertyPathTestEnum > EnumFour
Definition PropertyPathHelpersTest.h:188
void SetStruct(FPropertyPathTestStruct InStruct)
Definition PropertyPathHelpersTest.h:228
FPropertyPathTestStruct GetStruct() const
Definition PropertyPathHelpersTest.h:235
FPropertyPathTestStruct & GetStructRef() const
Definition PropertyPathHelpersTest.h:249
float GetFloat() const
Definition PropertyPathHelpersTest.h:221
~UPropertyPathTestObject()
Definition PropertyPathHelpersTest.h:163
TObjectPtr< UPropertyPathTestObject > InnerObject
Definition PropertyPathHelpersTest.h:209
void SetStructConstRef(FPropertyPathTestStruct InStruct)
Definition PropertyPathHelpersTest.h:256
bool IsSetterCalled() const
Definition PropertyPathHelpersTest.h:294
void SetStructRef(FPropertyPathTestStruct InStruct)
Definition PropertyPathHelpersTest.h:242
bool IsGetterCalled() const
Definition PropertyPathHelpersTest.h:299
const FPropertyPathTestStruct & GetStructConstRef() const
Definition PropertyPathHelpersTest.h:263
void SetFloat(float InFloat)
Definition PropertyPathHelpersTest.h:214
FPropertyPathTestStruct StructRef
Definition PropertyPathHelpersTest.h:203
TEnumAsByte< EPropertyPathTestEnum > EnumTwo
Definition PropertyPathHelpersTest.h:182
TEnumAsByte< EPropertyPathTestEnum > EnumThree
Definition PropertyPathHelpersTest.h:185
void ResetGetterSetterFlags() const
Definition PropertyPathHelpersTest.h:304
bool operator==(const UPropertyPathTestObject &Other) const
Definition PropertyPathHelpersTest.h:271
@ false
Definition radaudio_common.h:23
Definition PropertyPathHelpersTest.h:24
virtual ~FPropertyPathTestBaseStruct()
Definition PropertyPathHelpersTest.h:28
Definition PropertyPathHelpersTest.h:318
Definition PropertyPathHelpersTest.h:33
Definition PropertyPathHelpersTest.h:92
bool Bool
Definition PropertyPathHelpersTest.h:108
Definition ObjectPtr.h:488