12#ifndef __AUDACITY_MODULEMANAGER_H__
13#define __AUDACITY_MODULEMANAGER_H__
25class wxDynamicLibrary;
49 bool Load(wxString &deferredErrorMessage);
58 std::unique_ptr<wxDynamicLibrary>
mLib;
64 std::unique_ptr<PluginProvider>
mPtr;
97 static wxString GetPluginTypeString();
102 static void FindModules(
FilePaths &files);
104 std::vector< std::pair< std::unique_ptr<Module>, wxString > >;
105 static void TryLoadModules(
114 bool DiscoverProviders();
128 std::unique_ptr<ComponentInterface>
141 void InitializeBuiltins();
143 friend std::unique_ptr<ModuleManager> std::make_unique<ModuleManager>();
145 friend std::default_delete<ModuleManager>;
static PluginID GetID(EffectPlugin &effect)
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
std::map< wxString, PluginProviderUniqueHandle > PluginProviderHandlesMap
std::unique_ptr< PluginProvider >(*)() PluginProviderFactory
MODULE_MANAGER_API void UnregisterProviderFactory(PluginProviderFactory factory)
static struct Init sInitBuiltinModules
int(* fnModuleDispatch)(ModuleDispatchTypes type)
MODULE_MANAGER_API void RegisterProviderFactory(PluginProviderFactory factory)
ComponentInterface provides name / vendor / version functions to identify plugins....
void ShowLoadFailureError(const wxString &Error)
fnModuleDispatch mDispatch
std::unique_ptr< wxDynamicLibrary > mLib
Module(const FilePath &name)
void * GetSymbol(const wxString &name)
bool Load(wxString &deferredErrorMessage)
int Dispatch(ModuleDispatchTypes type)
const FilePath & GetName() const
std::vector< std::pair< std::unique_ptr< Module >, wxString > > DelayedErrors
static std::unique_ptr< ModuleManager > mInstance
PluginProviderHandlesMap mProviders
ModuleManager(const ModuleManager &)=delete
std::vector< std::unique_ptr< Module > > mModules
ModuleManager & operator=(const ModuleManager &)=delete
std::unique_ptr< PluginProvider > mPtr
PluginProviderUniqueHandle(PluginProviderUniqueHandle &&)=default
PluginProviderUniqueHandle(std::unique_ptr< PluginProvider > ptr)
PluginProvider * get() noexcept
PluginProvider * operator->() noexcept
PluginProviderUniqueHandle & operator=(const PluginProviderUniqueHandle &)=delete
PluginProviderUniqueHandle & operator=(PluginProviderUniqueHandle &&)=default
const PluginProvider * operator->() const noexcept
PluginProviderUniqueHandle()=default
PluginProviderUniqueHandle(const PluginProviderUniqueHandle &)=delete
const PluginProvider * get() const noexcept
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
auto Dispatch(Head_t< Types > &object, const TupleLike &functions, Args &&... args) -> std::enable_if_t< TypeListCheck_v< Types >, R >