1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Module manager (#549)

* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
This commit is contained in:
Paul Licameli
2020-05-29 11:48:52 -04:00
committed by GitHub
parent 5bede69d11
commit 9360359e9d
22 changed files with 35 additions and 99 deletions

View File

@@ -55,7 +55,7 @@ DECLARE_MODULE_ENTRY(AudacityModule)
{
// Create and register the importer
// Trust the module manager not to leak this
return safenew BuiltinCommandsModule(moduleManager, path);
return safenew BuiltinCommandsModule(path);
}
// ============================================================================
@@ -69,10 +69,8 @@ DECLARE_BUILTIN_MODULE(BuiltinsCommandBuiltin);
//
///////////////////////////////////////////////////////////////////////////////
BuiltinCommandsModule::BuiltinCommandsModule(ModuleManagerInterface *moduleManager,
const wxString *path)
BuiltinCommandsModule::BuiltinCommandsModule(const wxString *path)
{
mModMan = moduleManager;
if (path)
{
mPath = *path;

View File

@@ -27,7 +27,7 @@ class AudacityCommand;
class BuiltinCommandsModule final : public ModuleInterface
{
public:
BuiltinCommandsModule(ModuleManagerInterface *moduleManager, const wxString *path);
BuiltinCommandsModule(const wxString *path);
virtual ~BuiltinCommandsModule();
using Factory = std::function< std::unique_ptr<AudacityCommand> () >;
@@ -80,7 +80,6 @@ private:
static void DoRegistration(
const ComponentInterfaceSymbol &name, const Factory &factory );
ModuleManagerInterface *mModMan;
wxString mPath;
using CommandHash = std::unordered_map< wxString, const Entry* > ;