VST 3 SDK VST 3.7
SDK for developing VST plug-in
Macros for defining the class factory

Example - How to use the class factory macros: More...

+ Collaboration diagram for Macros for defining the class factory:

Macros

#define BEGIN_FACTORY_CLASS(FactoryClass, vendor, url, email, flags)
 
#define BEGIN_FACTORY(vendor, url, email, flags)
 
#define DEF_CLASS(cid, cardinality, category, name, createMethod)
 
#define DEF_CLASS1(cid, cardinality, category, name, createMethod)
 
#define DEF_CLASS2(cid, cardinality, category, name, classFlags, subCategories, version, sdkVersion, createMethod)
 
#define DEF_CLASS_W(cid, cardinality, category, name, classFlags, subCategories, version, sdkVersion, createMethod)
 
#define DEF_CLASS_W2(cid, cardinality, category, name, classFlags, subCategories, vendor, version, sdkVersion, createMethod)
 
#define END_FACTORY
 
#define DEF_VST3_CLASS(pluginName, pluginVst3Categories, classFlags, pluginVersion, processorCID, processorCreateFunc, controllerCID, controllerCreateFunc)
 

Detailed Description

Example - How to use the class factory macros:

BEGIN_FACTORY ("Steinberg Technologies",
"http://www.steinberg.de",
"mailto:info@steinberg.de",
PFactoryInfo::kNoFlags)
DEF_CLASS (INLINE_UID (0x00000000, 0x00000000, 0x00000000, 0x00000000),
PClassInfo::kManyInstances,
"Service",
"Test Service",
TestService::newInstance)
#define BEGIN_FACTORY(vendor, url, email, flags)
Definition: pluginfactory.h:145
#define END_FACTORY
Definition: pluginfactory.h:171
#define DEF_CLASS(cid, cardinality, category, name, createMethod)
Definition: pluginfactory.h:151

Macro Definition Documentation

◆ BEGIN_FACTORY_CLASS

#define BEGIN_FACTORY_CLASS (   FactoryClass,
  vendor,
  url,
  email,
  flags 
)
Value:
using namespace Steinberg; \
SMTG_EXPORT_SYMBOL IPluginFactory* PLUGIN_API GetPluginFactory () { \
{ static PFactoryInfo factoryInfo (vendor,url,email,flags); \
gPluginFactory = new FactoryClass (factoryInfo); \
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory * GetPluginFactory()
CPluginFactory * gPluginFactory

◆ BEGIN_FACTORY

#define BEGIN_FACTORY (   vendor,
  url,
  email,
  flags 
)
Value:
using namespace Steinberg; \
SMTG_EXPORT_SYMBOL IPluginFactory* PLUGIN_API GetPluginFactory () { \
{ static PFactoryInfo factoryInfo (vendor,url,email,flags); \
gPluginFactory = new CPluginFactory (factoryInfo); \
Default Class Factory implementation.
Definition: pluginfactory.h:49

◆ DEF_CLASS

#define DEF_CLASS (   cid,
  cardinality,
  category,
  name,
  createMethod 
)
Value:
{ TUID lcid = cid; static PClassInfo componentClass (lcid,cardinality,category,name); \
gPluginFactory->registerClass (&componentClass,createMethod); }
char TUID[16]

◆ DEF_CLASS1

#define DEF_CLASS1 (   cid,
  cardinality,
  category,
  name,
  createMethod 
)
Value:
{ static PClassInfo componentClass (cid,cardinality,category,name); \
gPluginFactory->registerClass (&componentClass,createMethod); }

◆ DEF_CLASS2

#define DEF_CLASS2 (   cid,
  cardinality,
  category,
  name,
  classFlags,
  subCategories,
  version,
  sdkVersion,
  createMethod 
)
Value:
{ TUID lcid = cid; static PClassInfo2 componentClass (lcid,cardinality,category,name,classFlags,subCategories,0,version,sdkVersion);\
gPluginFactory->registerClass (&componentClass,createMethod); }

◆ DEF_CLASS_W

#define DEF_CLASS_W (   cid,
  cardinality,
  category,
  name,
  classFlags,
  subCategories,
  version,
  sdkVersion,
  createMethod 
)
Value:
{ TUID lcid = cid; static PClassInfoW componentClass (lcid,cardinality,category,name,classFlags,subCategories,0,version,sdkVersion);\
gPluginFactory->registerClass (&componentClass,createMethod); }

◆ DEF_CLASS_W2

#define DEF_CLASS_W2 (   cid,
  cardinality,
  category,
  name,
  classFlags,
  subCategories,
  vendor,
  version,
  sdkVersion,
  createMethod 
)
Value:
{ TUID lcid = cid; static PClassInfoW componentClass (lcid,cardinality,category,name,classFlags,subCategories,vendor,version,sdkVersion);\
gPluginFactory->registerClass (&componentClass,createMethod); }

◆ END_FACTORY

#define END_FACTORY
Value:
} else gPluginFactory->addRef (); \
return gPluginFactory; }
virtual uint32 addRef()=0

◆ DEF_VST3_CLASS

#define DEF_VST3_CLASS (   pluginName,
  pluginVst3Categories,
  classFlags,
  pluginVersion,
  processorCID,
  processorCreateFunc,
  controllerCID,
  controllerCreateFunc 
)
Value:
{ \
{ \
const Steinberg::TUID lcid = processorCID; \
static Steinberg::PClassInfo2 processorClass ( \
lcid, Steinberg::PClassInfo::kManyInstances, kVstAudioEffectClass, pluginName, \
classFlags, pluginVst3Categories, 0, pluginVersion, kVstVersionString); \
gPluginFactory->registerClass (&processorClass, processorCreateFunc); \
} \
{ \
const Steinberg::TUID lcid = controllerCID; \
static Steinberg::PClassInfo2 controllerClass ( \
lcid, Steinberg::PClassInfo::kManyInstances, kVstComponentControllerClass, \
pluginName, 0, "", 0, pluginVersion, kVstVersionString); \
gPluginFactory->registerClass (&controllerClass, controllerCreateFunc); \
} \
}
Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.