11#ifndef __AUDACITY_LOAD_EFFECTS__
12#define __AUDACITY_LOAD_EFFECTS__
18#include <unordered_map>
35 using Factory = std::function< std::unique_ptr<Effect> () >;
39 template<
typename Sub
class >
42 Subclass::Symbol, []{
return std::make_unique< Subclass >(); },
67 const RegistrationCallback &callback)
72 std::unique_ptr<ComponentInterface>
78 std::unique_ptr<Effect> Instantiate(
const PluginPath & path);
81 static void DoRegistration(
86 using EffectHash = std::unordered_map< wxString, const Entry* > ;
std::vector< PluginPath > PluginPaths
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Generalized interface for discovery of plug-ins for one protocol.
Internal module to auto register all built in effects.
std::function< std::unique_ptr< Effect >() > Factory
FilePath InstallPath() override
Where plug-in files should be copied to install them.
std::unordered_map< wxString, const Entry * > EffectHash
virtual wxString GetVersion() const =0
virtual PluginPath GetPath() const =0
virtual VendorSymbol GetVendor() const =0
virtual ComponentInterfaceSymbol GetSymbol() const =0
virtual TranslatableString GetDescription() const =0
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Base class for many of the effects in Audacity.
virtual EffectFamilySymbol GetOptionalFamilySymbol()=0
A symbol identifying the family of plug-ins provided by this.
virtual unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback)=0
virtual void Terminate()=0
Called just prior to deletion to allow releasing any resources.
virtual PluginPaths FindModulePaths(PluginManagerInterface &pluginManager)=0
virtual std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path)=0
Load the plug-in at a path reported by DiscoverPluginsAtPath.
virtual void AutoRegisterPlugins(PluginManagerInterface &pluginManager)=0
Called so that a provider of a static set of plug-ins can register them.
virtual const FileExtensions & GetFileExtensions()=0
File types associated with this protocol.
virtual bool Initialize()=0
Called immediately after creation. Let provider initialize.
virtual bool CheckPluginExist(const PluginPath &path) const =0
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Registration(bool excluded=false)