Audacity  2.3.1
LoadCommands.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  LoadCommands.h
6 
7  Dominic Mazzoni
8  James Crook
9 
10 **********************************************************************/
11 
15 
16 #include "AudacityCommand.h"
17 #include "../MemoryX.h"
18 
20 //
21 // BuiltinCommandsModule
22 //
24 
26 {
27 public:
28  BuiltinCommandsModule(ModuleManagerInterface *moduleManager, const wxString *path);
29  virtual ~BuiltinCommandsModule();
30 
31  // ComponentInterface implementation
32 
33  wxString GetPath() override;
36  wxString GetVersion() override;
37  wxString GetDescription() override;
38 
39  // ModuleInterface implementation
40 
41  bool Initialize() override;
42  void Terminate() override;
43 
44  wxArrayString FileExtensions() override { return {}; }
45  wxString InstallPath() override { return {}; }
46 
47  bool AutoRegisterPlugins(PluginManagerInterface & pm) override;
48  wxArrayString FindPluginPaths(PluginManagerInterface & pm) override;
49  unsigned DiscoverPluginsAtPath(
50  const wxString & path, wxString &errMsg,
51  const RegistrationCallback &callback)
52  override;
53 
54  bool IsPluginValid(const wxString & path, bool bFast) override;
55 
56  ComponentInterface *CreateInstance(const wxString & path) override;
57  void DeleteInstance(ComponentInterface *instance) override;
58 
59 private:
60  // BuiltinEffectModule implementation
61 
62  std::unique_ptr<AudacityCommand> Instantiate(const wxString & path);
63 
64 private:
66  wxString mPath;
67 
68  wxArrayString mNames;
69 };
ComponentInterface * CreateInstance(const wxString &path) override
wxArrayString FileExtensions() override
Definition: LoadCommands.h:44
virtual ~BuiltinCommandsModule()
void Terminate() override
BuiltinCommandsModule(ModuleManagerInterface *moduleManager, const wxString *path)
wxArrayString FindPluginPaths(PluginManagerInterface &pm) override
wxString GetPath() override
Internal module to auto register all built in commands. It is closely modelled on BuiltinEffectsModul...
Definition: LoadCommands.h:25
bool AutoRegisterPlugins(PluginManagerInterface &pm) override
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional...
std::unique_ptr< AudacityCommand > Instantiate(const wxString &path)
void DeleteInstance(ComponentInterface *instance) override
ComponentInterfaceSymbol GetSymbol() override
wxString InstallPath() override
Definition: LoadCommands.h:45
ComponentInterfaceSymbol GetVendor() override
std::function< const PluginID &(ModuleInterface *, ComponentInterface *) > RegistrationCallback
bool IsPluginValid(const wxString &path, bool bFast) override
bool Initialize() override
unsigned DiscoverPluginsAtPath(const wxString &path, wxString &errMsg, const RegistrationCallback &callback) override
wxString GetDescription() override
wxString GetVersion() override
wxArrayString mNames
Definition: LoadCommands.h:68
ComponentInterface provides name / vendor / version functions to identify plugins. It is what makes a class a plug-in. Additionally it provides an optional parameter definitions function, for those components such as commands, effects and (soon) preference pagess that define parameters.
ModuleManagerInterface * mModMan
Definition: LoadCommands.h:65