VST 3 SDK: Macros for defining the compile time class factory
Author: Steinberg

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

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

Example: More...

Collaboration diagram for Macros for defining the compile time class factory:

## Macros
#define | BEGIN_FACTORY_DEF(company, url, email, noClasses)
#define | DEF_CLASS(cid, cardinality, category, name, classFlags, subCategories, version, sdkVersion, createMethod, createContext)
#define | END_FACTORY

## Detailed Description

Example:

static constexpr size_t numberOfClasses = 1;
static DECLARE_UID (TestPluginUID, 0x00000001, 0x00000002, 0x00000003, 0x00000004);
BEGIN_FACTORY_DEF ("MyCompany", "mycompany.com", "info@mycompany.com", numberOfClasses)
DEF_CLASS (TestPluginUID,
PClassInfo::kManyInstances,
"PlugIn",
"Test PlugIn",
0,
"SubCategory",
"1.0.0",
stringSDKVersion,
TestPlugin::newInstance,
nullptr)
END_FACTORY
DECLARE_UID
#define DECLARE_UID(name, l1, l2, l3, l4)
END_FACTORY
#define END_FACTORY
Definition pluginfactory.h:169
DEF_CLASS
#define DEF_CLASS(cid, cardinality, category, name, createMethod)
Definition pluginfactory.h:149
BEGIN_FACTORY_DEF
#define BEGIN_FACTORY_DEF(company, url, email, noClasses)
Definition pluginfactory_constexpr.h:176

## Macro Definition Documentation

## ◆ BEGIN_FACTORY_DEF

#define BEGIN_FACTORY_DEF | ( |  | company,
|  |  | url,
|  |  | email,
|  |  | noClasses )

Value:
struct SMTG_HIDDEN_SYMBOL FactoryData \
{ \
static constexpr Steinberg::PFactoryInfo factoryInfo = { \
company, url, email, Steinberg::PFactoryInfo::kUnicode}; \
\
static constexpr std::array<Steinberg::PluginFactoryDetail::ClassInfo2WithCreateFunc, \
noClasses> \
classInfos = {
Steinberg::PFactoryInfo
Steinberg::PFactoryInfo::kUnicode
kUnicode
Steinberg::PluginFactoryDetail::ClassInfo2WithCreateFunc
Definition pluginfactory_constexpr.h:107

## ◆ DEF_CLASS

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

Value:
Steinberg::PluginFactoryDetail::makeClassInfo2 (cid, cardinality, category, name, classFlags, \
subCategories, nullptr, version, sdkVersion, \
createMethod, createContext),
Steinberg::PluginFactoryDetail::makeClassInfo2
constexpr ClassInfo2WithCreateFunc makeClassInfo2(const TUID cid, int32 cardinality, const char8 *category, const char8 *name, int32 classFlags, const char8 *subCategories, const char8 *vendor, const char8 *version, const char8 *sdkVersion, ClassInfo2WithCreateFunc::CreateInstanceFunc func, void *context=nullptr)
Definition pluginfactory_constexpr.h:114

## ◆ END_FACTORY

#define END_FACTORY

Value:
};}; \
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory* PLUGIN_API GetPluginFactory () \
{ \
static Steinberg::PluginFactory<FactoryData> factory; \
return &factory; \
}
GetPluginFactory
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory * GetPluginFactory()
Empty

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