25 #include <pluginterfaces/base/funknown.h> 26 #include <pluginterfaces/base/ipluginbase.h> 27 #include <pluginterfaces/vst/ivstaudioprocessor.h> 28 #include <pluginterfaces/vst/ivstcomponent.h> 29 #include <public.sdk/source/main/pluginfactoryvst3.h> 79 template<
typename RTProcessorClass,
typename GUIControllerClass>
81 const std::string& iURL,
82 const std::string& iEmail,
83 const std::string& iPluginName,
84 const std::string& iPluginVersion,
85 const std::string& iSubCategories,
86 void *iContext =
nullptr);
92 template<
typename RTClass,
typename GUIClass>
94 std::string
const &iURL,
95 std::string
const &iEmail,
96 std::string
const &iPluginName,
97 std::string
const &iPluginVersion,
98 std::string
const &iSubCategories,
104 Steinberg::PFactoryInfo factoryInfo(iVendor.c_str(),
107 Steinberg::Vst::kDefaultFactoryFlags);
110 auto factory = std::make_unique<Steinberg::CPluginFactory>(factoryInfo);
114 Steinberg::TUID lcid = INLINE_UID_FROM_FUID(RTClass::UUID());
115 Steinberg::PClassInfo2 component{lcid,
116 Steinberg::PClassInfo::kManyInstances,
117 kVstAudioEffectClass,
119 static_cast<Steinberg::int32>(Steinberg::Vst::kDistributable),
120 iSubCategories.c_str(),
122 iPluginVersion.c_str(),
125 factory->registerClass(&component, RTClass::createInstance, iContext);
130 Steinberg::TUID lcid = INLINE_UID_FROM_FUID(GUIClass::UUID());
131 Steinberg::PClassInfo2 component{lcid,
132 Steinberg::PClassInfo::kManyInstances,
133 kVstComponentControllerClass,
134 (iPluginName +
"Controller").c_str(),
138 iPluginVersion.c_str(),
141 factory->registerClass(&component, GUIClass::createInstance, iContext);
146 return factory.release();
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.
Definition: PluginFactory.h:93
The purpose of this class is to make it easier and safer to create the plugin factory.
Definition: PluginFactory.h:66