5#include "Containers/Array.h"
20#include "PropertyPathHelpers.generated.h"
91 enum { WithPostSerialize =
true };
240 mutable void* CachedLastContainerInPath;
246 mutable bool bCanSafelyUsedCachedAddress;
252 struct FPropertyPathResolver;
253 struct FPropertyStructView;
254 template<
typename T>
struct FInternalGetterResolver;
255 template<
typename T>
struct FInternalSetterResolver;
525 PropertyPathHelpersInternal::FInternalSetterResolver<T> Resolver(
InValue);
630 struct FPropertyPathResolver
633 virtual ~FPropertyPathResolver() {}
646 struct FPropertyStructView
659 template<
typename DerivedType>
660 struct TPropertyPathResolver :
public FPropertyPathResolver
687 template<
typename T,
typename ContainerType>
688 struct FCallGetterFunctionHelper
699 struct FCallGetterFunctionHelper<T,
UObject>
738 template<
typename T,
typename ContainerType>
739 struct FGetValueHelper
750 ArrayIndex = ArrayIndex ==
INDEX_NONE ? 0 : ArrayIndex;
772 template<
typename T,
typename ContainerType,
int32 N>
773 struct FGetValueHelper<T[N], ContainerType>
800 template<
typename ContainerType>
801 struct FGetValueHelper<
bool, ContainerType>
812 ArrayIndex = ArrayIndex ==
INDEX_NONE ? 0 : ArrayIndex;
838 template<
typename T,
typename ContainerType>
862 if(
void* Address =
static_cast<void*
>(
ArrayHelper.GetRawPtr(ArrayIndex)))
905 struct FInternalGetterResolver :
public TPropertyPathResolver<FInternalGetterResolver<T>>
913 template<
typename ContainerType>
924 template<
typename T,
typename ContainerType>
925 struct FCallSetterFunctionHelper
936 struct FCallSetterFunctionHelper<T,
UObject>
946 if constexpr (std::is_same<FPropertyStructView, T>::value)
948 const FPropertyStructView&
InStuctView =
static_cast<const FPropertyStructView&
>(
InValue);
979 template<
typename T,
typename ContainerType>
980 struct FSetValueHelper
988 if constexpr (std::is_same<FPropertyStructView, T>::value)
990 const FPropertyStructView&
InStuctView =
static_cast<const FPropertyStructView&
>(
InValue);
993 ArrayIndex = ArrayIndex ==
INDEX_NONE ? 0 : ArrayIndex;
1013 ArrayIndex = ArrayIndex ==
INDEX_NONE ? 0 : ArrayIndex;
1035 template<
typename T,
typename ContainerType,
int32 N>
1036 struct FSetValueHelper<T[N], ContainerType>
1063 template<
typename ContainerType>
1064 struct FSetValueHelper<
bool, ContainerType>
1076 ArrayIndex = ArrayIndex ==
INDEX_NONE ? 0 : ArrayIndex;
1111 template<
typename T,
typename ContainerType>
1129 if constexpr (std::is_same<FPropertyStructView, T>::value)
1131 const FPropertyStructView&
InStuctView =
static_cast<const FPropertyStructView&
>(
InValue);
1136 if (
void* Address =
static_cast<void*
>(
ArrayHelper.GetRawPtr(ArrayIndex)))
1152 if (
void* Address =
static_cast<void*
>(
ArrayHelper.GetRawPtr(ArrayIndex)))
1167 if constexpr (!std::is_same<FPropertyStructView, T>::value)
1198 template<
typename T>
1199 struct FInternalSetterResolver :
public TPropertyPathResolver<FInternalSetterResolver<T>>
1206 template<
typename ContainerType>
1254 template<
typename T>
1255 struct FGetValueFastHelper
1287 template<
typename T,
int32 N>
1288 struct FGetValueFastHelper<T[N]>
1311 template<
typename T,
typename ContainerType>
1327 template<
typename T>
1328 struct FSetValueFastHelper
1336 const void*
Value =
nullptr;
1337 if constexpr (std::is_same<FPropertyStructView, T>::value)
1339 const FPropertyStructView&
InStuctView =
static_cast<const FPropertyStructView&
>(
InValue);
1349 if constexpr (!std::is_same<FPropertyStructView, T>::value)
1392 template<
typename T,
int32 N>
1393 struct FSetValueFastHelper<T[N]>
1410 struct FSetValueFastHelper<
bool>
1451 template<
typename T,
typename ContainerType>
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
@ CPF_Parm
Function/When call parameter.
Definition ObjectMacros.h:426
@ CPF_OutParm
Value is copied out after function call.
Definition ObjectMacros.h:427
@ CPF_ReturnParm
Return value.
Definition ObjectMacros.h:429
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
@ PPF_None
Definition PropertyPortFlags.h:15
Definition Archive.h:1208
Definition UnrealType.h:3702
Definition UnrealType.h:2543
Definition UnrealType.h:6738
Definition NameTypes.h:617
Definition UnrealType.h:174
Definition UnrealType.h:4564
Definition UnrealType.h:4175
Definition UnrealType.h:7083
Definition AssetRegistryState.h:50
virtual COREUOBJECT_API void ProcessEvent(UFunction *Function, void *Parms)
Definition ScriptCore.cpp:2015
IAnalyticsPropertyStore::EStatusCode SetValue(TGetter &&GetterFn, TSetter &&SetterFn, const T &ProposedValue, TCompare &&ConditionFn)
Definition AnalyticsPropertyStore.cpp:34
uint32 Type
Definition UnrealType.h:6835
T::FDataType GetValue(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey, const typename T::FDataType &DefaultValue)
Definition ValueOrBBKey.h:51
Definition FieldSystemNoiseAlgo.cpp:6
Definition PropertyPathHelpers.cpp:10
void CallParentSetters(const FCachedPropertyPath &InPropertyPath)
Definition PropertyPathHelpers.cpp:523
FProperty * GetFirstParamProperty(UFunction *InFunction)
Definition PropertyPathHelpers.cpp:511
void CallParentGetters(void *OutValue, const FCachedPropertyPath &InPropertyPath, const void *InPropertyAddress)
Definition PropertyPathHelpers.cpp:586
bool ResolvePropertyPath(UObject *InContainer, const FString &InPropertyPath, FPropertyPathResolver &InResolver)
Definition PropertyPathHelpers.cpp:479
Definition PropertyPathHelpers.cpp:1090
bool PerformArrayOperation(UObject *InContainer, const FString &InPropertyPath, TFunctionRef< bool(FScriptArrayHelper &, int32)> InOperation)
Definition PropertyPathHelpers.cpp:1301
void FindFieldNameAndArrayIndex(int32 InCount, const TCHAR *InString, int32 &OutCount, const TCHAR **OutPropertyName, int32 &OutArrayIndex)
Definition PropertyPathHelpers.cpp:1091
bool CopyPropertyValue(UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
Definition PropertyPathHelpers.cpp:1248
bool SetPropertyValueFromString(UObject *InContainer, const FString &InPropertyPath, const FString &InValue, uint32 PPF_Flags)
Definition PropertyPathHelpers.cpp:1202
bool GetPropertyValueAsString(UObject *InContainer, const FString &InPropertyPath, FString &OutValue, uint32 PPF_Flags)
Definition PropertyPathHelpers.cpp:1114
bool SetPropertyValue(UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const UScriptStruct *InScriptStruct, const uint8 *InValue)
Definition PropertyPathHelpers.cpp:1236
bool CopyPropertyValueFast(UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
Definition PropertyPathHelpers.cpp:1273
EPropertyBagResult GetPropertyValue(const FPropertyBagPropertyDesc *Desc, const void *Address, T &OutValue)
Definition PropertyBag.cpp:761
Definition PropertyPathHelpers.h:97
PROPERTYPATH_API ~FCachedPropertyPath()
bool IsValid() const
Definition PropertyPathHelpers.h:120
Definition UnrealType.h:7001
Definition UnrealType.h:6865
Definition PropertyPathHelpers.h:28
PROPERTYPATH_API int32 GetArrayIndex() const
Definition PropertyPathHelpers.cpp:725
Definition ObjectPtr.h:488
Definition StructOpsTypeTraits.h:11
Definition StructOpsTypeTraits.h:46