2022-07-21 12:35:25 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-01-13 01:54:01 -05:00
|
|
|
#include "Containers/Map.h"
|
|
|
|
|
|
|
|
|
|
struct FMVVMBlueprintPropertyPath;
|
2022-07-21 12:35:25 -04:00
|
|
|
|
|
|
|
|
class UClass;
|
|
|
|
|
class UEdGraph;
|
2022-10-05 16:05:24 -04:00
|
|
|
class UK2Node_CallFunction;
|
2022-07-21 12:35:25 -04:00
|
|
|
class UMVVMBlueprintView;
|
2022-07-22 07:39:25 -04:00
|
|
|
class UWidgetBlueprint;
|
|
|
|
|
struct FMVVMBlueprintViewBinding;
|
2022-07-21 12:35:25 -04:00
|
|
|
|
|
|
|
|
namespace UE::MVVM::ConversionFunctionHelper
|
|
|
|
|
{
|
2022-10-06 20:08:12 -04:00
|
|
|
/** Find all BlueprintPropertyPath used by the given binding. */
|
|
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API TMap<FName, FMVVMBlueprintPropertyPath> GetAllArgumentPropertyPaths(const UWidgetBlueprint* WidgetBlueprint, const FMVVMBlueprintViewBinding& Binding, bool bSourceToDestination, bool bSkipResolve);
|
|
|
|
|
|
2022-10-05 16:05:24 -04:00
|
|
|
/** Find all BlueprintPropertyPath used by the given conversion function node. */
|
2022-10-06 20:08:12 -04:00
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API TMap<FName, FMVVMBlueprintPropertyPath> GetAllArgumentPropertyPaths(const UWidgetBlueprint* WidgetBlueprint, const UK2Node_CallFunction* FunctionNode, bool bSkipResolve);
|
2022-10-05 16:05:24 -04:00
|
|
|
|
|
|
|
|
/** Find the property path of a given argument in the conversion function. */
|
2022-10-06 20:08:12 -04:00
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API FMVVMBlueprintPropertyPath GetPropertyPathForArgument(const UWidgetBlueprint* WidgetBlueprint, const UK2Node_CallFunction* Function, FName ArgumentName, bool bSkipResolve);
|
2022-07-21 12:35:25 -04:00
|
|
|
|
2022-10-05 16:05:24 -04:00
|
|
|
/** Create the name of the conversion function wrapper this binding should have. */
|
|
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API FName CreateWrapperName(const FMVVMBlueprintViewBinding& Binding, bool bSourceToDestination);
|
2022-07-22 07:39:25 -04:00
|
|
|
|
|
|
|
|
/** Get an existing conversion graph for the corresponding binding if it exist. */
|
|
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API UEdGraph* GetGraph(const UWidgetBlueprint* WidgetBlueprint, const FMVVMBlueprintViewBinding& Binding, bool bSourceToDestination);
|
|
|
|
|
|
2022-10-05 16:05:24 -04:00
|
|
|
/** Find the conversion function node from the given graph. */
|
|
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API UK2Node_CallFunction* GetFunctionNode(UEdGraph* Graph);
|
|
|
|
|
|
|
|
|
|
/** Mark the given function node as the conversion function node. */
|
|
|
|
|
MODELVIEWVIEWMODELBLUEPRINT_API void MarkAsConversionFunction(const UK2Node_CallFunction* FunctionNode, const FMVVMBlueprintViewBinding& Binding);
|
2023-01-13 01:54:01 -05:00
|
|
|
} //namespace
|
|
|
|
|
|
|
|
|
|
#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "MVVMPropertyPath.h"
|
|
|
|
|
#endif
|