Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Private/MetasoundFrontendInterfaceRegistryPrivate.h
rob gay aeb25bb49d - Add Runtime MetaSound Builder support
- Add MetaSound Patch Interface support
- Add MetaSound Interface Bindings
#rb phil.popp
#preflight 640783bd5515f4f57b4b1268
[FYI] Sondra.Moyls
[FYI] Dan.Reynolds

[CL 24548617 by rob gay in ue5-main branch]
2023-03-07 17:01:52 -05:00

51 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundFrontendArchetypeRegistry.h"
#include "MetasoundFrontendController.h"
#include "MetasoundFrontendDocument.h"
#include "MetasoundFrontendRegistryTransaction.h"
#include "UObject/NoExportTypes.h"
namespace Metasound
{
namespace Frontend
{
using FInterfaceTransactionStream = TTransactionStream<FInterfaceRegistryTransaction>;
class FInterfaceRegistry : public IInterfaceRegistry
{
public:
static FInterfaceRegistry& Get();
FInterfaceRegistry();
virtual ~FInterfaceRegistry() = default;
virtual void RegisterInterface(TUniquePtr<IInterfaceRegistryEntry>&& InEntry) override;
virtual const IInterfaceRegistryEntry* FindInterfaceRegistryEntry(const FInterfaceRegistryKey& InKey) const override;
virtual bool FindInterface(const FInterfaceRegistryKey& InKey, FMetasoundFrontendInterface& OutInterface) const override;
virtual void AddInterfaceOutputBindings(const FMetasoundFrontendVersion& InInputInterfaceVersion, TArray<FMetasoundFrontendInterfaceBinding>&& InBinding) override;
virtual bool RemoveInterfaceOutputBinding(const FMetasoundFrontendVersion& InInputInterfaceVersion, const FMetasoundFrontendVersion& InOutputInterfaceVersion) override;
virtual bool RemoveAllInterfaceOutputBindings(const FMetasoundFrontendVersion& InInputInterfaceVersion) override;
TUniquePtr<FInterfaceTransactionStream> CreateTransactionStream();
virtual void ForEachRegistryTransactionSince(FRegistryTransactionID InSince, FRegistryTransactionID* OutCurrentRegistryTransactionID, TFunctionRef<void(const FInterfaceRegistryTransaction&)> InFunc) const override;
private:
using FInterfaceTransactionBuffer = TTransactionBuffer<FInterfaceRegistryTransaction>;
TMap<FInterfaceRegistryKey, TUniquePtr<IInterfaceRegistryEntry>> Entries;
TSharedRef<FInterfaceTransactionBuffer> TransactionBuffer;
};
}
}