Audacity 3.2.0
VST3EffectsModule.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file VST3EffectsModule.h
6
7 @author Vitaly Sverchinsky
8
9 @brief Part of Audacity VST3 module
10
11**********************************************************************/
12
13#pragma once
14
15#include <unordered_map>
16#include <memory>
17
18#include "PluginProvider.h"
19
20namespace VST3
21{
22 namespace Hosting
23 {
24 class Module;
25 }
26}
27
32{
33 //Holds weak pointers to the unique modules which were accessed
34 //through VST3EffectsModule::GetModule() during the lifetime.
35 std::unordered_map<wxString, std::weak_ptr<VST3::Hosting::Module>> mModules;
36
37 //Attempts to look up for a module, or load it from the hard drive if
38 //none was found (or not valid pointers)
39 std::shared_ptr<VST3::Hosting::Module> GetModule(const wxString& path);
40
41public:
42
43 PluginPath GetPath() const override;
44 ComponentInterfaceSymbol GetSymbol() const override;
45 VendorSymbol GetVendor() const override;
46 wxString GetVersion() const override;
47 TranslatableString GetDescription() const override;
48
49 bool Initialize() override;
50 void Terminate() override;
52 const FileExtensions& GetFileExtensions() override;
53 FilePath InstallPath() override;
54 void AutoRegisterPlugins(PluginManagerInterface& pluginManager) override;
55 PluginPaths FindModulePaths(PluginManagerInterface& pluginManager) override;
56 unsigned DiscoverPluginsAtPath(const PluginPath& path, TranslatableString& errMsg,
57 const RegistrationCallback& callback) override;
58 bool CheckPluginExist(const PluginPath& path) const override;
59 std::unique_ptr<ComponentInterface>
60 LoadPlugin(const PluginPath& path) override;
61 std::unique_ptr<Validator> MakeValidator() const override;
62};
std::vector< PluginPath > PluginPaths
Definition: Identifier.h:215
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
Generalized interface for discovery of plug-ins for one protocol.
wxString FilePath
Definition: Project.h:21
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
std::function< const PluginID &(PluginProvider *, ComponentInterface *) > RegistrationCallback
Further expand a path reported by FindModulePaths.
Holds a msgid for the translation catalog; may also bind format arguments.
VST3Effect factory.
void AutoRegisterPlugins(PluginManagerInterface &pluginManager) override
Called so that a provider of a static set of plug-ins can register them.
const FileExtensions & GetFileExtensions() override
File types associated with this protocol.
PluginPaths FindModulePaths(PluginManagerInterface &pluginManager) override
std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path) override
Load the plug-in at a path reported by DiscoverPluginsAtPath.
void Terminate() override
Called just prior to deletion to allow releasing any resources.
std::unique_ptr< Validator > MakeValidator() const override
TranslatableString GetDescription() const override
bool CheckPluginExist(const PluginPath &path) const override
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
FilePath InstallPath() override
Where plug-in files should be copied to install them.
EffectFamilySymbol GetOptionalFamilySymbol() override
A symbol identifying the family of plug-ins provided by this.
bool Initialize() override
Called immediately after creation. Let provider initialize.
VendorSymbol GetVendor() const override
std::unordered_map< wxString, std::weak_ptr< VST3::Hosting::Module > > mModules
wxString GetVersion() const override
PluginPath GetPath() const override
ComponentInterfaceSymbol GetSymbol() const override
std::shared_ptr< VST3::Hosting::Module > GetModule(const wxString &path)
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.