Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Private/MetasoundDocumentInterface.cpp
rob gay 711a973c73 - Move MetaSoundAssetSubsystem& BuilderSubsystem implementations to monolithics that are initialized at MetaSoundEngine module load for safety
- Avoids PreDefault vs Default module Init which can interact negatively and obscurely with EngineSubsystems not being loaded prior to certain builds/scenarios where serialized assets are loaded earlier
- Sunset existing Subsystem non-UFUNCTION calls not pertaining to direct Blueprint exposition
- Optimize AssetManager to use own key vs NodeRegistryKey and TopLevelPaths vs SoftObjectPaths
- Misc module clean-up
- Misc callsite refactors to use new monolithics
#rb phil.popp
[FYI] sondra.moyls, helen.yang

#tests EngineTest & AudioQA Automation PIE Packaged Build -game

[CL 33522338 by rob gay in ue5-main branch]
2024-05-08 14:53:53 -04:00

39 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetasoundDocumentInterface.h"
namespace Metasound::Frontend
{
namespace DocumentInterfacePrivate
{
TUniquePtr<IDocumentBuilderRegistry> Instance;
}
IDocumentBuilderRegistry* IDocumentBuilderRegistry::Get()
{
return DocumentInterfacePrivate::Instance.Get();
}
IDocumentBuilderRegistry& IDocumentBuilderRegistry::GetChecked()
{
return *DocumentInterfacePrivate::Instance.Get();
}
void IDocumentBuilderRegistry::Deinitialize()
{
check(DocumentInterfacePrivate::Instance.IsValid());
DocumentInterfacePrivate::Instance.Reset();
}
void IDocumentBuilderRegistry::Initialize(TUniquePtr<IDocumentBuilderRegistry>&& InInstance)
{
check(!DocumentInterfacePrivate::Instance.IsValid());
DocumentInterfacePrivate::Instance = MoveTemp(InInstance);
}
IMetaSoundDocumentBuilderRegistry& IMetaSoundDocumentBuilderRegistry::GetChecked()
{
return static_cast<IMetaSoundDocumentBuilderRegistry&>(IDocumentBuilderRegistry::GetChecked());
}
} // namespace Metasound::Frontend