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/pluginfactory.h> 32 #define EXPORT_FACTORY SMTG_EXPORT_SYMBOL 82 template<
typename RTProcessorClass,
typename GUIControllerClass>
84 const std::string& iURL,
85 const std::string& iEmail,
86 const std::string& iPluginName,
87 const std::string& iPluginVersion,
88 const std::string& iSubCategories,
89 void *iContext =
nullptr)
91 return createFactory<RTProcessorClass, GUIControllerClass>(iVendor,
98 static_cast<Steinberg::int32>(Steinberg::Vst::kDistributable));
109 template<
typename RTProcessorClass,
typename GUIControllerClass>
111 const std::string& iURL,
112 const std::string& iEmail,
113 const std::string& iPluginName,
114 const std::string& iPluginVersion,
115 const std::string& iSubCategories,
116 void *iContext =
nullptr)
118 return createFactory<RTProcessorClass, GUIControllerClass>(iVendor,
131 template<
typename RTProcessorClass,
typename GUIControllerClass>
132 static Steinberg::IPluginFactory*
createFactory(
const std::string& iVendor,
133 const std::string& iURL,
134 const std::string& iEmail,
135 const std::string& iPluginName,
136 const std::string& iPluginVersion,
137 const std::string& iSubCategories,
139 int32 iProcessorFlags);
145 template<
typename RTClass,
typename GUIClass>
147 std::string
const &iURL,
148 std::string
const &iEmail,
149 std::string
const &iPluginName,
150 std::string
const &iPluginVersion,
151 std::string
const &iSubCategories,
153 int32 iProcessorFlags)
158 Steinberg::PFactoryInfo factoryInfo(iVendor.c_str(),
161 Steinberg::Vst::kDefaultFactoryFlags);
164 auto factory = std::make_unique<Steinberg::CPluginFactory>(factoryInfo);
168 Steinberg::TUID lcid = INLINE_UID_FROM_FUID(RTClass::UUID());
169 Steinberg::PClassInfo2 component{lcid,
170 Steinberg::PClassInfo::kManyInstances,
171 kVstAudioEffectClass,
174 iSubCategories.c_str(),
176 iPluginVersion.c_str(),
179 factory->registerClass(&component, RTClass::createInstance, iContext);
184 Steinberg::TUID lcid = INLINE_UID_FROM_FUID(GUIClass::UUID());
185 Steinberg::PClassInfo2 component{lcid,
186 Steinberg::PClassInfo::kManyInstances,
187 kVstComponentControllerClass,
188 (iPluginName +
"Controller").c_str(),
192 iPluginVersion.c_str(),
195 factory->registerClass(&component, GUIClass::createInstance, iContext);
200 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:83
static Steinberg::IPluginFactory * createFactory(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, int32 iProcessorFlags)
Definition: PluginFactory.h:146
The purpose of this class is to make it easier and safer to create the plugin factory.
Definition: PluginFactory.h:69
static Steinberg::IPluginFactory * GetNonDistributableVST3PluginFactory(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)
This flavor of this API lets you create a plugin that is not declared distributable.
Definition: PluginFactory.h:110