Audacity 3.2.0
Namespaces | Macros | Typedefs | Functions
ModuleManager.cpp File Reference

Based on LoadLadspa, this code loads pluggable Audacity extension modules. It also has the code to invoke a function returning a replacement window, i.e. an alternative to the usual interface, for Audacity. More...

#include "ModuleManager.h"
#include "PluginProvider.h"
#include "BasicUI.h"
#include <wx/dynlib.h>
#include <wx/log.h>
#include <wx/filename.h>
#include "FileNames.h"
#include "MemoryX.h"
#include "PluginInterface.h"
Include dependency graph for ModuleManager.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{ModuleManager.cpp}
 

Macros

#define initFnName   "ExtensionModuleInit"
 
#define versionFnName   "GetVersionString"
 

Typedefs

typedef wxChar *(* tVersionFn) ()
 
using BuiltinProviderList = std::vector< PluginProviderFactory >
 

Functions

static BasicUI::MessageBoxResult DoMessageBox (const TranslatableString &msg)
 
BuiltinProviderListanonymous_namespace{ModuleManager.cpp}::builtinProviderList ()
 
void RegisterProviderFactory (PluginProviderFactory pluginProviderFactory)
 
void UnregisterProviderFactory (PluginProviderFactory pluginProviderFactory)
 

Detailed Description

Based on LoadLadspa, this code loads pluggable Audacity extension modules. It also has the code to invoke a function returning a replacement window, i.e. an alternative to the usual interface, for Audacity.

Definition in file ModuleManager.cpp.

Macro Definition Documentation

◆ initFnName

#define initFnName   "ExtensionModuleInit"

Definition at line 40 of file ModuleManager.cpp.

◆ versionFnName

#define versionFnName   "GetVersionString"

Definition at line 41 of file ModuleManager.cpp.

Typedef Documentation

◆ BuiltinProviderList

Definition at line 176 of file ModuleManager.cpp.

◆ tVersionFn

typedef wxChar *(* tVersionFn) ()

Definition at line 44 of file ModuleManager.cpp.

Function Documentation

◆ DoMessageBox()

static BasicUI::MessageBoxResult DoMessageBox ( const TranslatableString msg)
static

Definition at line 57 of file ModuleManager.cpp.

58{
59 using namespace BasicUI;
60 return ShowMessageBox(msg,
61 MessageBoxOptions{}.Caption(XO("Module Unsuitable")));
62}
XO("Cut/Copy/Paste")
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
Definition: BasicUI.h:277
MessageBoxOptions && Caption(TranslatableString caption_) &&
Definition: BasicUI.h:101

References BasicUI::MessageBoxOptions::Caption(), BasicUI::ShowMessageBox(), and XO().

Referenced by Module::Load(), Module::ShowLoadFailureError(), and ModuleManager::TryLoadModules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterProviderFactory()

void RegisterProviderFactory ( PluginProviderFactory  pluginProviderFactory)

Definition at line 185 of file ModuleManager.cpp.

186{
187 auto &list = builtinProviderList();
188 if(pluginProviderFactory)
189 list.push_back(std::move(pluginProviderFactory));
190}
BuiltinProviderList & builtinProviderList()

References anonymous_namespace{ModuleManager.cpp}::builtinProviderList().

Referenced by Init::Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnregisterProviderFactory()

void UnregisterProviderFactory ( PluginProviderFactory  pluginProviderFactory)

Definition at line 192 of file ModuleManager.cpp.

193{
194 auto &list = builtinProviderList();
195 auto end = list.end(), iter = std::find(list.begin(), end, pluginProviderFactory);
196 if (iter != end)
197 list.erase(iter);
198}
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159

References anonymous_namespace{ModuleManager.cpp}::builtinProviderList(), and PackedArray::end().

Here is the call graph for this function: