You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
28 lines
960 B
C++
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
|