Jamba C++ API
4.4.0
|
The purpose of this class is to make it easier and safer to create the plugin factory. More...
#include <PluginFactory.h>
Static Public Member Functions | |
template<typename RTProcessorClass , typename GUIControllerClass > | |
static Steinberg::IPluginFactory * | GetVST3PluginFactory (const std::string &iVendor, const std::string &iURL, const std::string &iEmail, const std::string &iPluginName, const std::string &iPluginVersion, const std::string &iSubCategories, void *iContext=nullptr) |
Main method to create the factory for the plugin. More... | |
The purpose of this class is to make it easier and safer to create the plugin factory.
The implementation provided with the VST3 SDK relies on macros, comments (like "do not changed this" or "not used here") and ends up creating static
instances which are never destroyed until the DAW quits (which is the normal behavior for static variables defined inside functions...) even if there are no more instances of the plugin (although it is not a big "leak", it is nonetheless one!).
You use this class in the following manner:
GetPluginFactory()
method takes an additional (optional) parameter not shown in this example which is provided to the factory method of the controller and processor (iContext
) and can be used to provide additional information like a constructor argument for the parameters class or the parameters themselves or whatever else you want.
|
static |
Main method to create the factory for the plugin.
See example in the class comment. The optional iContext
last arguments will be provided to the controller and processor factory methods (the macros provided with the SDK do not let you set this parameter).
RTProcessorClass | the class for the processor (assumes existence of UUID() and createInstance(void *) static methods) |
GUIControllerClass | the class for the controller (assumes existence of UUID() and createInstance(void *) static methods) |