12#ifndef __AUDACITY_LOAD_COMMANDS__
13#define __AUDACITY_LOAD_COMMANDS__
19#include <unordered_map>
36 using Factory = std::function< std::unique_ptr<AudacityCommand> () >;
40 template<
typename Sub
class >
43 Subclass::Symbol, []{
return std::make_unique< Subclass >(); } );
67 const RegistrationCallback &callback)
72 std::unique_ptr<ComponentInterface>
78 std::unique_ptr<AudacityCommand> Instantiate(
const PluginPath & path);
83 static void DoRegistration(
86 using CommandHash = 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.
Base class for command in Audacity.
Internal module to auto register all built in commands. It is closely modelled on BuiltinEffectsModul...
std::function< std::unique_ptr< AudacityCommand >() > Factory
std::unordered_map< wxString, const Entry * > CommandHash
FilePath InstallPath() override
Where plug-in files should be copied to install them.
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,...
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.