UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyPath.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
8#include "CoreMinimal.h"
9#include "HAL/PlatformCrt.h"
10#include "Misc/TVariant.h"
12#include "UObject/FieldPath.h"
13#include "UObject/Object.h"
15#include "UObject/UnrealType.h"
18
19class FProperty;
20class UObject;
21class UScriptStruct;
22
23namespace UE::PropertyViewer
24{
25
27{
28public:
30
31 FPropertyPath() = default;
34 ADVANCEDWIDGETS_API FPropertyPath(const UScriptStruct* ScriptStruct, void* Data, const FProperty* Property);
35 ADVANCEDWIDGETS_API FPropertyPath(const UScriptStruct* ScriptStruct, void* Data, FPropertyArray Properties);
36
37public:
38 bool HasProperty() const
39 {
40 return Properties.Num() != 0;
41 }
42
44 {
45 return HasProperty() ? Properties.Last() : nullptr;
46 }
47
49 {
50 return MakeArrayView(Properties);
51 }
52
54 ADVANCEDWIDGETS_API const void* GetContainerPtr() const;
55
56private:
57 TWeakObjectPtr<UObject> TopLevelContainer_Object = nullptr;
58 TWeakObjectPtr<const UScriptStruct> TopLevelContainer_ScriptStruct = nullptr;
59 void* TopLevelContainer_ScriptStructData = nullptr;
60
61 FPropertyArray Properties;
62};
63
64} //namespace
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition UnrealType.h:174
Definition ArrayView.h:139
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType & Last(SizeType IndexFromTheEnd=0) UE_LIFETIMEBOUND
Definition Array.h:1263
Definition Object.h:95
Definition Class.h:1720
Definition FieldIconFinder.cpp:16
Definition WeakObjectPtrTemplates.h:25
Definition PropertyPath.h:27
ADVANCEDWIDGETS_API void * GetContainerPtr()
Definition PropertyPath.cpp:37
TArray< const FProperty *, TInlineAllocator< 1 > > FPropertyArray
Definition PropertyPath.h:29
TArrayView< const FProperty *const > GetProperties() const
Definition PropertyPath.h:48
bool HasProperty() const
Definition PropertyPath.h:38
const FProperty * GetLastProperty() const
Definition PropertyPath.h:43