VST 3 SDK VST 3.7 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Macros
Macros for defining the class factory
Common SDK Implementation Helper Classes

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)
END_FACTORY
INLINE_UID
#define INLINE_UID(l1, l2, l3, l4)
BEGIN_FACTORY
#define BEGIN_FACTORY(vendor, url, email, flags)
Definition pluginfactory.h:145
END_FACTORY
#define END_FACTORY
Definition pluginfactory.h:171
DEF_CLASS
#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 () { \
if (!gPluginFactory) \
{ static PFactoryInfo factoryInfo (vendor,url,email,flags); \
gPluginFactory = new FactoryClass (factoryInfo); \
Steinberg::IPluginFactory
GetPluginFactory
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory * GetPluginFactory()
Steinberg
Steinberg::gPluginFactory
CPluginFactory * gPluginFactory
Steinberg::PFactoryInfo

## ◆ BEGIN_FACTORY

#define BEGIN_FACTORY | ( |  | vendor,
|  |  | url,
|  |  | email,
|  |  | flags )

Value:
using namespace Steinberg; \
SMTG_EXPORT_SYMBOL IPluginFactory* PLUGIN_API GetPluginFactory () { \
if (!gPluginFactory) \
{ static PFactoryInfo factoryInfo (vendor,url,email,flags); \
gPluginFactory = new CPluginFactory (factoryInfo); \
Steinberg::CPluginFactory
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); }
Steinberg::CPluginFactory::registerClass
bool registerClass(const PClassInfo *info, FUnknown *(*createFunc)(void *), void *context=nullptr)
Registers a plug-in class with classInfo version 1, returns true for success.

## ◆ 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,nullptr,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,nullptr,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; }
Steinberg::FUnknown::addRef
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); \
} \
}
kVstAudioEffectClass
#define kVstAudioEffectClass
kVstComponentControllerClass
#define kVstComponentControllerClass
Steinberg::TUID
char TUID[16]
Steinberg::PClassInfo2
Steinberg::PClassInfo::kManyInstances
kManyInstances
kVstVersionString
#define kVstVersionString
Empty

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