UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IFieldExpander.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Class.h"
7#include "UObject/Object.h"
9
11class FProperty;
12class FStructProperty;
13class UFunction;
14class UStruct;
15
16namespace UE::PropertyViewer
17{
18
21{
22public:
29 virtual ~IFieldExpander() = default;
30
31 UE_DEPRECATED(5.2, "CanExpandFunction is deprecated and GetExpandedFunction should be used instead.")
33 {
34 return GetExpandedFunction(Function).IsSet();
35 }
36};
37
39{
40public:
42
44 {
45 None = 0,
46 UseInstanceClass = 1 << 1,
47 RequireValidInstance = 1 << 2,
48 };
49
50
52 {
53 None = 0,
56 };
57
59 {
63 {
65 }
67 {
68 return Instance->GetClass();
69 }
70 return Property->PropertyClass.Get();
71 }
72
73 virtual bool CanExpandScriptStruct(const FStructProperty*) const override
74 {
75 return bExpandScriptStruct;
76 }
77
79 {
80 if (Function && ExpandFunction == EFunctionExpand::FunctionProperties)
81 {
82 return Function;
83 }
84 else if (Function && ExpandFunction == EFunctionExpand::FunctionReturnProperty)
85 {
87 {
88 return ObjectProperty->PropertyClass.Get();
89 }
90 }
92 }
93
98
100 {
101 bExpandScriptStruct = bInExpandScriptStruct;
102 }
103
104 UE_DEPRECATED(5.2, "Use the SetExpandFunction with the EExpandFunctionType")
109
114
115private:
117 bool bExpandScriptStruct = false;
118 EFunctionExpand ExpandFunction = EFunctionExpand::None;
119};
121
122} //namespace
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
constexpr bool EnumHasAllFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:28
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition UnrealType.h:2725
Definition UnrealType.h:174
Definition UnrealType.h:6306
Definition IFieldExpander.h:39
virtual TOptional< const UClass * > CanExpandObject(const FObjectPropertyBase *Property, const UObject *Instance) const override
Definition IFieldExpander.h:58
virtual bool CanExpandScriptStruct(const FStructProperty *) const override
Definition IFieldExpander.h:73
EFunctionExpand
Definition IFieldExpander.h:52
void SetExpandScriptStruct(bool bInExpandScriptStruct)
Definition IFieldExpander.h:99
void SetExpandObject(EObjectExpandFlag InExpandObject)
Definition IFieldExpander.h:94
virtual TOptional< const UStruct * > GetExpandedFunction(const UFunction *Function) const override
Definition IFieldExpander.h:78
void SetExpandFunction(bool bInExpandFunction)
Definition IFieldExpander.h:105
void SetExpandFunction(EFunctionExpand InExpandFunction)
Definition IFieldExpander.h:110
EObjectExpandFlag
Definition IFieldExpander.h:44
Definition IFieldExpander.h:21
virtual bool CanExpandScriptStruct(const FStructProperty *StructProperty) const =0
virtual bool CanExpandFunction(const UFunction *Function) const
Definition IFieldExpander.h:32
virtual TOptional< const UStruct * > GetExpandedFunction(const UFunction *Function) const =0
virtual TOptional< const UClass * > CanExpandObject(const FObjectPropertyBase *Property, const UObject *Instance) const =0
Definition Class.h:2476
Definition Object.h:95
Definition Class.h:480
Definition FieldIconFinder.cpp:16
Definition Optional.h:131