Audacity 3.2.0
|
#include <ModuleManager.h>
Public Member Functions | |
void | Initialize () |
int | Dispatch (ModuleDispatchTypes type) |
bool | DiscoverProviders () |
auto | Providers () const |
auto | Providers () |
bool | RegisterEffectPlugin (const PluginID &provider, const PluginPath &path, TranslatableString &errMsg) |
PluginProvider * | CreateProviderInstance (const PluginID &provider, const PluginPath &path) |
std::unique_ptr< ComponentInterface > | LoadPlugin (const PluginID &provider, const PluginPath &path) |
bool | IsProviderValid (const PluginID &provider, const PluginPath &path) |
bool | CheckPluginExist (const PluginID &providerId, const PluginPath &path) |
Static Public Member Functions | |
static ModuleManager & | Get () |
static wxString | GetPluginTypeString () |
static PluginID | GetID (const PluginProvider *provider) |
Private Types | |
using | DelayedErrors = std::vector< std::pair< std::unique_ptr< Module >, wxString > > |
Private Member Functions | |
ModuleManager () | |
~ModuleManager () | |
ModuleManager (const ModuleManager &)=delete | |
ModuleManager & | operator= (const ModuleManager &)=delete |
void | InitializeBuiltins () |
Static Private Member Functions | |
static void | FindModules (FilePaths &files) |
static void | TryLoadModules (const FilePaths &files, FilePaths &decided, DelayedErrors &errors) |
Private Attributes | |
PluginProviderHandlesMap | mProviders |
std::vector< std::unique_ptr< Module > > | mModules |
Static Private Attributes | |
static std::unique_ptr< ModuleManager > | mInstance {} |
Friends | |
std::unique_ptr< ModuleManager > | std::make_unique () |
Definition at line 85 of file ModuleManager.h.
|
private |
Definition at line 103 of file ModuleManager.h.
|
private |
Definition at line 210 of file ModuleManager.cpp.
|
private |
Definition at line 214 of file ModuleManager.cpp.
References anonymous_namespace{ModuleManager.cpp}::builtinProviderList(), and mProviders.
|
privatedelete |
bool ModuleManager::CheckPluginExist | ( | const PluginID & | providerId, |
const PluginPath & | path | ||
) |
Definition at line 525 of file ModuleManager.cpp.
References mProviders.
Referenced by PluginManager::InitializePlugins().
PluginProvider * ModuleManager::CreateProviderInstance | ( | const PluginID & | provider, |
const PluginPath & | path | ||
) |
Definition at line 504 of file ModuleManager.cpp.
References mProviders.
Referenced by PluginManager::IsPluginAvailable(), and PluginManager::Load().
bool ModuleManager::DiscoverProviders | ( | ) |
Definition at line 437 of file ModuleManager.cpp.
References FileNames::AddMultiPathsToPathList(), FileNames::AddUniquePathToPathList(), FileNames::FindFilesInPathList(), InitializeBuiltins(), FileNames::ModulesDir(), and wxT().
int ModuleManager::Dispatch | ( | ModuleDispatchTypes | type | ) |
Definition at line 377 of file ModuleManager.cpp.
References mModules.
Referenced by AudacityApp::InitPart2(), ProjectManager::New(), ProjectManager::OnCloseWindow(), and QuitAudacity().
|
staticprivate |
Definition at line 221 of file ModuleManager.cpp.
References FileNames::AddMultiPathsToPathList(), FileNames::AddUniquePathToPathList(), FileNames::AudacityPathList(), FileNames::FindFilesInPathList(), and wxT().
Referenced by Initialize().
|
static |
Definition at line 414 of file ModuleManager.cpp.
References mInstance.
Referenced by PluginDataModel::ApplyChanges(), PluginManager::CheckPluginUpdates(), PluginManager::ClearEffectPlugins(), anonymous_namespace{PluginHost.cpp}::Discover(), PluginManager::DropFile(), PluginManager::Initialize(), PluginManager::InitializePlugins(), AudacityApp::InitPart2(), PluginManager::IsPluginAvailable(), PluginManager::Load(), ProjectManager::New(), ProjectManager::OnCloseWindow(), PluginHost::PluginHost(), PluginRegistrationDialog::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), QuitAudacity(), and TryLoadModules().
|
static |
Definition at line 427 of file ModuleManager.cpp.
References ComponentInterface::GetPath(), GetPluginTypeString(), ComponentInterface::GetSymbol(), ComponentInterface::GetVendor(), ComponentInterfaceSymbol::Internal(), and wxT().
Referenced by PluginManager::GetID(), and InitializeBuiltins().
|
static |
Definition at line 422 of file ModuleManager.cpp.
Referenced by GetID(), and PluginManager::GetPluginTypeString().
void ModuleManager::Initialize | ( | ) |
Definition at line 350 of file ModuleManager.cpp.
References FindModules(), kModuleFailed, ModuleSettings::SetModuleStatus(), and TryLoadModules().
Referenced by AudacityApp::InitPart2().
|
private |
Definition at line 474 of file ModuleManager.cpp.
References anonymous_namespace{ModuleManager.cpp}::builtinProviderList(), GetID(), id, and mProviders.
Referenced by DiscoverProviders().
bool ModuleManager::IsProviderValid | ( | const PluginID & | provider, |
const PluginPath & | path | ||
) |
Definition at line 533 of file ModuleManager.cpp.
std::unique_ptr< ComponentInterface > ModuleManager::LoadPlugin | ( | const PluginID & | provider, |
const PluginPath & | path | ||
) |
Definition at line 515 of file ModuleManager.cpp.
References mProviders.
|
privatedelete |
|
inline |
Definition at line 120 of file ModuleManager.h.
References make_iterator_range().
|
inline |
Definition at line 117 of file ModuleManager.h.
References make_iterator_range().
bool ModuleManager::RegisterEffectPlugin | ( | const PluginID & | provider, |
const PluginPath & | path, | ||
TranslatableString & | errMsg | ||
) |
Definition at line 491 of file ModuleManager.cpp.
References PluginManagerInterface::DefaultRegistrationCallback(), and mProviders.
|
staticprivate |
Definition at line 248 of file ModuleManager.cpp.
References DoMessageBox(), Error, Get(), ModuleSettings::GetModuleStatus(), kModuleAsk, kModuleDisabled, kModuleEnabled, kModuleFailed, kModuleNew, mModules, ModuleSettings::SetModuleStatus(), BasicUI::ShowMultiDialog(), wxT(), and XO().
Referenced by Initialize().
|
friend |
|
staticprivate |
Definition at line 146 of file ModuleManager.h.
Referenced by Get().
|
private |
Definition at line 155 of file ModuleManager.h.
Referenced by Dispatch(), and TryLoadModules().
|
private |
Definition at line 151 of file ModuleManager.h.
Referenced by CheckPluginExist(), CreateProviderInstance(), InitializeBuiltins(), LoadPlugin(), RegisterEffectPlugin(), and ~ModuleManager().