You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
|
|
|
|
#include <ImplementationManager.h>
|
|
|
|
#include <ATLControlsModel.h>
|
|
#include <AudioControlsEditorPlugin.h>
|
|
#include <IAudioSystemEditor.h>
|
|
|
|
|
|
//-----------------------------------------------------------------------------------------------//
|
|
CImplementationManager::CImplementationManager()
|
|
{
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------------------------//
|
|
bool CImplementationManager::LoadImplementation()
|
|
{
|
|
AudioControls::CATLControlsModel* pATLModel = CAudioControlsEditorPlugin::GetATLModel();
|
|
if (pATLModel)
|
|
{
|
|
pATLModel->ClearAllConnections();
|
|
|
|
// release the loaded implementation (if any)
|
|
Release();
|
|
|
|
AudioControlsEditor::EditorImplPluginEventBus::Broadcast(&AudioControlsEditor::EditorImplPluginEventBus::Events::InitializeEditorImplPlugin);
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
|
|
ImplementationChanged();
|
|
return true;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------------------------//
|
|
void CImplementationManager::Release()
|
|
{
|
|
AudioControlsEditor::EditorImplPluginEventBus::Broadcast(&AudioControlsEditor::EditorImplPluginEventBus::Events::ReleaseEditorImplPlugin);
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------------------------//
|
|
AudioControls::IAudioSystemEditor* CImplementationManager::GetImplementation()
|
|
{
|
|
AudioControls::IAudioSystemEditor* editor = nullptr;
|
|
AudioControlsEditor::EditorImplPluginEventBus::BroadcastResult(editor, &AudioControlsEditor::EditorImplPluginEventBus::Events::GetEditorImplPlugin);
|
|
return editor;
|
|
}
|
|
|
|
#include <Source/Editor/moc_ImplementationManager.cpp>
|