Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundFrontendDocumentModifyDelegates.h
Rob Gay 4a29925129 - Remove --> RemoveSwap delegates to allow for handlers to not duplicate forwarded messages where applicable
- Refactor remove node handler for transactor to not do swap piecemeal, which was resulting in dropped connections
- Add test for adding/removing nodes while auditioning (excercises add/remove edges by extension)
#rb phil.popp
#rnx
#jira UE-191865

[CL 26888573 by Rob Gay in 5.3 branch]
2023-08-07 12:58:06 -04:00

56 lines
2.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Delegates/DelegateCombinations.h"
#include "MetasoundFrontendDocument.h"
#include "Templates/SharedPointer.h"
DECLARE_MULTICAST_DELEGATE_OneParam(FOnMetaSoundFrontendDocumentMutateArray, int32 /* Index */);
DECLARE_MULTICAST_DELEGATE_OneParam(FOnMetaSoundFrontendDocumentMutateInterfaceArray, const FMetasoundFrontendInterface& /* Interface */);
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnMetaSoundFrontendDocumentRemoveSwappingArray, int32 /* Index */, int32 /* LastIndex */);
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnMetaSoundFrontendDocumentRenameClass, const int32 /* Index */, const FMetasoundFrontendClassName& /* NewName */);
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnMetaSoundFrontendDocumentMutateNodeInputLiteralArray, int32 /* NodeIndex */, int32 /* VertexIndex */, int32 /* LiteralIndex */);
namespace Metasound::Frontend
{
struct METASOUNDFRONTEND_API FInterfaceModifyDelegates
{
FOnMetaSoundFrontendDocumentMutateInterfaceArray OnInterfaceAdded;
FOnMetaSoundFrontendDocumentMutateInterfaceArray OnRemovingInterface;
FOnMetaSoundFrontendDocumentMutateArray OnInputAdded;
FOnMetaSoundFrontendDocumentMutateArray OnRemovingInput;
FOnMetaSoundFrontendDocumentMutateArray OnOutputAdded;
FOnMetaSoundFrontendDocumentMutateArray OnRemovingOutput;
};
struct METASOUNDFRONTEND_API FNodeModifyDelegates
{
FOnMetaSoundFrontendDocumentMutateArray OnNodeAdded;
FOnMetaSoundFrontendDocumentRemoveSwappingArray OnRemoveSwappingNode;
FOnMetaSoundFrontendDocumentMutateNodeInputLiteralArray OnNodeInputLiteralSet;
FOnMetaSoundFrontendDocumentMutateNodeInputLiteralArray OnRemovingNodeInputLiteral;
};
struct METASOUNDFRONTEND_API FEdgeModifyDelegates
{
FOnMetaSoundFrontendDocumentMutateArray OnEdgeAdded;
FOnMetaSoundFrontendDocumentRemoveSwappingArray OnRemoveSwappingEdge;
};
struct METASOUNDFRONTEND_API FDocumentModifyDelegates : TSharedFromThis<FDocumentModifyDelegates>
{
FOnMetaSoundFrontendDocumentMutateArray OnDependencyAdded;
FOnMetaSoundFrontendDocumentRemoveSwappingArray OnRemoveSwappingDependency;
FOnMetaSoundFrontendDocumentRenameClass OnRenamingDependencyClass;
FInterfaceModifyDelegates InterfaceDelegates;
FNodeModifyDelegates NodeDelegates;
FEdgeModifyDelegates EdgeDelegates;
};
} // namespace Metasound::Frontend