Files
UnrealEngineUWP/Engine/Plugins/Runtime/ModelViewViewModel/Source/ModelViewViewModelBlueprint/Private/MVVMFunctionGraphHelper.h
patrick boutot f381f16a34 MVVM: First version of the viewmodel editor
#rb sebastien.nordgren, daren.cheng
#preflight 6256afff2b4502493e72edc2

#ROBOMERGE-AUTHOR: patrick.boutot
#ROBOMERGE-SOURCE: CL 19742639 via CL 19743098 via CL 19743424
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19745035 by patrick boutot in ue5-main branch]
2022-04-13 16:06:35 -04:00

36 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Templates/SubclassOf.h"
#include "UObject/Object.h"
class FKismetCompilerContext;
class UEdGraph;
namespace UE::MVVM::FunctionGraphHelper
{
/** Generate a function graph that can be viewed in the BP editor. */
MODELVIEWVIEWMODELBLUEPRINT_API UEdGraph* CreateFunctionGraph(FKismetCompilerContext& Context, const FStringView FunctionName, EFunctionFlags ExtraFunctionFlag, const FStringView Category, bool bIsEditable);
/** Generate a function graph that cannot be viewed in the BP editor. */
MODELVIEWVIEWMODELBLUEPRINT_API UEdGraph* CreateIntermediateFunctionGraph(FKismetCompilerContext& Context, const FStringView FunctionName, EFunctionFlags ExtraFunctionFlag, const FStringView Category, bool bIsEditable);
/** Add an input argument to an existing function graph. */
MODELVIEWVIEWMODELBLUEPRINT_API bool AddFunctionArgument(UEdGraph* FunctionGraph, TSubclassOf<UObject> Argument, FName ArgumentName);
/** Add an input argument to an existing function graph. */
MODELVIEWVIEWMODELBLUEPRINT_API bool AddFunctionArgument(UEdGraph* FunctionGraph, FProperty* Argument, FName ArgumentName);
/** Generate the nodes needed for to call the MVVMView::SetViewModel function. */
MODELVIEWVIEWMODELBLUEPRINT_API bool GenerateViewModelSetter(FKismetCompilerContext& Context, UEdGraph* FunctionGraph, FName IiewModelName);
/** Generate the nodes needed for to set the property and to call the broadcast field notify function. */
MODELVIEWVIEWMODELBLUEPRINT_API bool GenerateViewModelFieldNotifySetter(FKismetCompilerContext& Context, UEdGraph* FunctionGraph, FProperty* Property, FName InputPinName);
/** Generate the nodes needed to broadcast field notify function. */
MODELVIEWVIEWMODELBLUEPRINT_API bool GenerateViewModelFielNotifyBroadcast(FKismetCompilerContext& Context, UEdGraph* FunctionGraph, FProperty* Property);
} //namespace