Files
rob gay 48b172ac25 Initial work to pipe builder updates to dynamic graph
- Add delegates to respond to builder changes to document
- Add delegate handlers to source builder to forward requests to audition sound if live update enabled
- Misc piping for live updating
#jira UE-186952
#ok forgithub public
#rb phil.popp

[CL 26072716 by rob gay in 5.3 branch]
2023-06-16 17:55:08 -04:00

28 lines
960 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetasoundDocumentInterface.h"
namespace Metasound::Frontend
{
namespace DocumentBuilderRegistryPrivate
{
TUniqueFunction<IMetaSoundDocumentBuilderRegistry&()> GetInstance;
} // namespace DocumentBuilderRegistryPrivate
IMetaSoundDocumentBuilderRegistry& IMetaSoundDocumentBuilderRegistry::GetChecked()
{
using namespace DocumentBuilderRegistryPrivate;
checkf(GetInstance, TEXT("Failed to return MetaSoundDocumentBuilderRegistry instance: Registry has not been initialized"));
return GetInstance();
}
void IMetaSoundDocumentBuilderRegistry::Set(TUniqueFunction<IMetaSoundDocumentBuilderRegistry&()>&& InGetInstance)
{
using namespace DocumentBuilderRegistryPrivate;
checkf(!GetInstance, TEXT("Failed to initialize MetaSoundDocumentBuilderRegistry getter: Cannot reinitialize once initialized."))
GetInstance = MoveTemp(InGetInstance);
}
} // namespace Metasound::Frontend