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:
@@ -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;
|
||||
|
||||
@@ -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* > ;
|
||||
|
||||
Reference in New Issue
Block a user