Remove macro making extern declaration of RegisterBuiltinModule...

... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.

Does this make scripts/graph.pl show a new dependency cycle?  Happily no.  But
now we know.
This commit is contained in:
Paul Licameli 2021-05-13 14:53:19 -04:00
parent b92f2579b7
commit 64bbc31c54
10 changed files with 16 additions and 6 deletions

View File

@ -141,11 +141,6 @@ public:
// ----------------------------------------------------------------------------
#define MODULE_ENTRY AudacityModule
// ----------------------------------------------------------------------------
// The module entry point prototype
// ----------------------------------------------------------------------------
typedef ModuleInterface *(*ModuleMain)(const wxString *path);
// ----------------------------------------------------------------------------
// If BUILDING_AUDACITY is defined during the current build, it is assumed
// that the module wishes to be embedded in the Audacity executable.
@ -170,7 +165,6 @@ static ModuleInterface * name(const wxString *path)
// method must be supplied explicitly.
// ----------------------------------------------------------------------------
#define DECLARE_BUILTIN_MODULE_BASE(name) \
extern void RegisterBuiltinModule(ModuleMain rtn); \
class name \
{ \
public: \

View File

@ -130,4 +130,12 @@ private:
std::vector<std::unique_ptr<Module>> mModules;
};
// ----------------------------------------------------------------------------
// The module entry point prototype
// ----------------------------------------------------------------------------
using ModuleMain = ModuleInterface *(*)(const wxString *path);
AUDACITY_DLL_API
void RegisterBuiltinModule(ModuleMain rtn);
#endif /* __AUDACITY_MODULEMANAGER_H__ */

View File

@ -16,6 +16,7 @@ modelled on BuiltinEffectsModule
#include "LoadCommands.h"
#include "AudacityCommand.h"
#include "ModuleManager.h"
#include "../Prefs.h"

View File

@ -17,6 +17,7 @@
#include "../Prefs.h"
#include "Effect.h"
#include "ModuleManager.h"
static bool sInitialized = false;

View File

@ -26,6 +26,7 @@
#include "VSTEffect.h"
#include "../../ModuleManager.h"
#include "../../widgets/ProgressDialog.h"

View File

@ -18,6 +18,7 @@
#if USE_AUDIO_UNITS
#include "AudioUnitEffect.h"
#include "../../ModuleManager.h"
#include <wx/defs.h>
#include <wx/base64.h>

View File

@ -58,6 +58,7 @@ effects from this one class.
#include "../../widgets/NumericTextCtrl.h"
#include "../../widgets/valnum.h"
#include "../../widgets/wxPanelWrapper.h"
#include "../../ModuleManager.h"
#if wxUSE_ACCESSIBILITY
#include "../../widgets/WindowAccessible.h"

View File

@ -23,6 +23,7 @@ Functions that find and load all LV2 plugins on the system.
#endif
#include "LoadLV2.h"
#include "../../ModuleManager.h"
#include <cstdio>
#include <cstdlib>

View File

@ -18,6 +18,7 @@
#include "../../FileNames.h"
#include "../../PluginManager.h"
#include "../../ModuleManager.h"
// ============================================================================
// List of effects that ship with Audacity. These will be autoregistered.

View File

@ -12,6 +12,7 @@
#if defined(USE_VAMP)
#include "LoadVamp.h"
#include "../../ModuleManager.h"
#include <wx/filename.h>