Files
UnrealEngineUWP/Engine/Source/Developer/RigVMDeveloper/Public/RigVMUserWorkflowRegistry.h
Helge Mathee 5dc04e3587 RigVM: Provide subject to user workflow callbacks
#rb na
#jira UE-144670
#preflight https://horde.devtools.epicgames.com/job/624c4f95090236773aff9970

[CL 19625079 by Helge Mathee in ue5-main branch]
2022-04-05 10:39:09 -04:00

36 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "RigVMCore/RigVMUserWorkflow.h"
#include "RigVMModel/RigVMNode.h"
#include "RigVMUserWorkflowRegistry.generated.h"
DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(TArray<FRigVMUserWorkflow>, FRigVMUserWorkflowProvider, const UObject*, InSubject);
UCLASS(BlueprintType)
class RIGVMDEVELOPER_API URigVMUserWorkflowRegistry : public UObject
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category = FRigVMUserWorkflowRegistry)
static URigVMUserWorkflowRegistry* Get();
UFUNCTION(BlueprintCallable, Category = FRigVMUserWorkflowRegistry)
int32 RegisterProvider(const UScriptStruct* InStruct, FRigVMUserWorkflowProvider InProvider);
UFUNCTION(BlueprintCallable, Category = FRigVMUserWorkflowRegistry)
void UnregisterProvider(int32 InHandle);
UFUNCTION(BlueprintPure, Category = FRigVMUserWorkflowRegistry)
TArray<FRigVMUserWorkflow> GetWorkflows(ERigVMUserWorkflowType InType, const UScriptStruct* InStruct, const UObject* InSubject) const;
private:
int32 MaxHandle = 0;
mutable TArray<TTuple<int32, const UScriptStruct*, FRigVMUserWorkflowProvider>> Providers;
};