1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-12 01:15:39 +01:00

Create ComponentInterface

It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
This commit is contained in:
James Crook
2018-11-02 15:31:44 +00:00
parent c63dcbd3ca
commit 466e9c179e
161 changed files with 875 additions and 597 deletions

View File

@@ -44,7 +44,7 @@
#include <functional>
#include "audacity/Types.h"
#include "audacity/IdentInterface.h"
#include "audacity/ComponentInterface.h"
#include "audacity/PluginInterface.h"
// ============================================================================
@@ -64,7 +64,7 @@
///
// ============================================================================
class ModuleInterface /* not final */ : public IdentInterface
class ModuleInterface /* not final */ : public ComponentInterface
{
public:
virtual ~ModuleInterface() {};
@@ -113,7 +113,7 @@ public:
// Return value is the number of plugins found.
using RegistrationCallback =
std::function<
const PluginID &(ModuleInterface *, IdentInterface *) >;
const PluginID &(ModuleInterface *, ComponentInterface *) >;
virtual unsigned DiscoverPluginsAtPath(
const wxString & path, wxString &errMsg,
const RegistrationCallback &callback )
@@ -124,10 +124,10 @@ public:
virtual bool IsPluginValid(const wxString & path, bool bFast) = 0;
// When appropriate, CreateInstance() will be called to instantiate the plugin.
virtual IdentInterface *CreateInstance(const wxString & path) = 0;
virtual ComponentInterface *CreateInstance(const wxString & path) = 0;
// When appropriate, DeleteInstance() will be called to delete the plugin.
virtual void DeleteInstance(IdentInterface *instance) = 0;
virtual void DeleteInstance(ComponentInterface *instance) = 0;
};
// ============================================================================