VST 3 SDK VST 3.6.11 SDK for developing VST Plug-in

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
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(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 | END_FACTORY

## 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

## Macro Definition Documentation

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

Value:
using namespace Steinberg; \
EXPORT_FACTORY IPluginFactory* PLUGIN_API GetPluginFactory () { \
if (!gPluginFactory) \
{ static PFactoryInfo factoryInfo (vendor,url,email,flags); \
gPluginFactory = new CPluginFactory (factoryInfo); \
Steinberg::PFactoryInfo
Steinberg::CPluginFactory
Default Class Factory implementation.
Definition: pluginfactoryvst3.h:48
EXPORT_FACTORY
#define EXPORT_FACTORY
Definition: pluginfactoryvst3.h:124
Steinberg::IPluginFactory
GetPluginFactory
Steinberg::IPluginFactory * GetPluginFactory()

#define DEF_CLASS | ( |  | cid,
|  |  | cardinality,
|  |  | category,
|  |  | name,
|  |  | createMethod
| ) |  |

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

#define DEF_CLASS1 | ( |  | cid,
|  |  | cardinality,
|  |  | category,
|  |  | name,
|  |  | createMethod
| ) |  |

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

#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); }
Steinberg::PClassInfo2
TUID
int8 TUID[16]

#define DEF_CLASS_W | ( |  | cid,
|  |  | cardinality,
|  |  | category,
|  |  | name,
|  |  | classFlags,
|  |  | subCategories,
|  |  | version,
|  |  | sdkVersion,
|  |  | createMethod
| ) |  |

Value:
{ TUID lcid = cid; static PClassInfoUnicode componentClass (lcid,cardinality,category,name,classFlags,subCategories, 0,version,sdkVersion);\
gPluginFactory->registerClass (&componentClass,createMethod); }
TUID
int8 TUID[16]

#define END_FACTORY

Value:
} else gPluginFactory->addRef (); \
return gPluginFactory; }
Steinberg::FUnknown::addRef
virtual uint32 addRef()=0
Empty

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