Audacity  3.0.3
Classes | Typedefs | Functions | Variables
ModuleManager.h File Reference
#include "MemoryX.h"
#include <functional>
#include <map>
#include <vector>
#include "audacity/Types.h"
#include "Identifier.h"
#include "ModuleConstants.h"
Include dependency graph for ModuleManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Module
 
struct  ModuleInterfaceDeleter
 
class  ModuleManager
 
struct  Init
 

Typedefs

typedef int(* fnModuleDispatch) (ModuleDispatchTypes type)
 
using ModuleInterfaceHandle = std::unique_ptr< ModuleInterface, ModuleInterfaceDeleter >
 
typedef std::map< wxString, ModuleInterfaceHandleModuleMap
 
typedef std::map< ModuleInterface *, std::unique_ptr< wxDynamicLibrary > > LibraryMap
 
using ModuleMain = ModuleInterface *(*)()
 

Functions

AUDACITY_DLL_API void RegisterProvider (ModuleMain rtn)
 
AUDACITY_DLL_API void UnregisterProvider (ModuleMain rtn)
 

Variables

static struct Init sInitBuiltinModules
 

Typedef Documentation

◆ fnModuleDispatch

typedef int(* fnModuleDispatch) (ModuleDispatchTypes type)

Definition at line 37 of file ModuleManager.h.

◆ LibraryMap

typedef std::map<ModuleInterface *, std::unique_ptr<wxDynamicLibrary> > LibraryMap

Definition at line 68 of file ModuleManager.h.

◆ ModuleInterfaceHandle

Definition at line 63 of file ModuleManager.h.

◆ ModuleMain

using ModuleMain = ModuleInterface *(*)()

Definition at line 143 of file ModuleManager.h.

◆ ModuleMap

typedef std::map<wxString, ModuleInterfaceHandle> ModuleMap

Definition at line 67 of file ModuleManager.h.

Function Documentation

◆ RegisterProvider()

AUDACITY_DLL_API void RegisterProvider ( ModuleMain  rtn)

Definition at line 185 of file ModuleManager.cpp.

186 {
187  auto &list = builtinModuleList();
188  if ( moduleMain )
189  list.push_back(moduleMain);
190 
191  return;
192 }

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

Here is the call graph for this function:

◆ UnregisterProvider()

AUDACITY_DLL_API void UnregisterProvider ( ModuleMain  rtn)

Definition at line 194 of file ModuleManager.cpp.

195 {
196  auto &list = builtinModuleList();
197  auto end = list.end(), iter = std::find(list.begin(), end, moduleMain);
198  if (iter != end)
199  list.erase(iter);
200 }

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

Here is the call graph for this function:

Variable Documentation

◆ sInitBuiltinModules

struct Init sInitBuiltinModules
static
anonymous_namespace{ModuleManager.cpp}::builtinModuleList
BuiltinModuleList & builtinModuleList()
Definition: ModuleManager.cpp:178