Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Private/Interfaces/MetasoundFrontendInterfaceRegistryPrivate.h
rob gay 1de499ef8e More MetaSound Interface registry clean-up
- Move bIsDefault/bCanEdit(renamed bIsModifiable) from InterfaceRegistryEntry to Interface data definition
- Add checks in builder to disallow mutation of interfaces that shouldn't be via editor or document builder (ex. SourceInterface which is default and then never changed)
- Optimize SearchEngine query for finding default interfaces
- Tweak MetaSoundUObjectRegistry to support non MetasoundAssetBase classes and add UMetaSoundBuilderDocument. Update iterator w/optional param to only return asset types (true by default for back compat)
- Move FName class name comparitors to use new TopLevelAssetPath
#rb phil.popp
#jira UE-181360
#rnx
#p4v-preflight-copy 24658328
#preflight 642b10834d26bcd1eb0e566c

[CL 24920763 by rob gay in ue5-main branch]
2023-04-04 19:14:26 -04:00

39 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Interfaces/MetasoundFrontendInterfaceRegistry.h"
#include "MetasoundFrontendController.h"
#include "MetasoundFrontendDocument.h"
#include "MetasoundFrontendRegistryTransaction.h"
#include "UObject/NoExportTypes.h"
#include "UObject/TopLevelAssetPath.h"
namespace Metasound::Frontend
{
using FInterfaceTransactionStream = TTransactionStream<FInterfaceRegistryTransaction>;
class FInterfaceRegistry : public IInterfaceRegistry
{
public:
static FInterfaceRegistry& Get();
FInterfaceRegistry();
virtual ~FInterfaceRegistry() = default;
virtual bool RegisterInterface(TUniquePtr<IInterfaceRegistryEntry>&& InEntry) override;
virtual const IInterfaceRegistryEntry* FindInterfaceRegistryEntry(const FInterfaceRegistryKey& InKey) const override;
virtual bool FindInterface(const FInterfaceRegistryKey& InKey, FMetasoundFrontendInterface& OutInterface) const override;
TUniquePtr<FInterfaceTransactionStream> CreateTransactionStream();
private:
using FInterfaceTransactionBuffer = TTransactionBuffer<FInterfaceRegistryTransaction>;
TMap<FInterfaceRegistryKey, TUniquePtr<IInterfaceRegistryEntry>> Entries;
TSharedRef<FInterfaceTransactionBuffer> TransactionBuffer;
};
} // namespace Metasound::Frontend