Example - How to use the class factory macros:  
More...
|  | 
| #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) | 
|  | 
Example - How to use the class factory macros: 
               "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
  
◆ BEGIN_FACTORY_CLASS
      
        
          | #define BEGIN_FACTORY_CLASS | ( |  | FactoryClass, | 
        
          |  |  |  | vendor, | 
        
          |  |  |  | url, | 
        
          |  |  |  | email, | 
        
          |  |  |  | flags | 
        
          |  | ) |  |  | 
      
 
Value:
    {   
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:
    {   
static PFactoryInfo factoryInfo (vendor,url,email,flags); \
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); }
 
 
◆ 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
Value:
virtual uint32 addRef()=0
 
 
 
◆ DEF_VST3_CLASS
      
        
          | #define DEF_VST3_CLASS | ( |  | pluginName, | 
        
          |  |  |  | pluginVst3Categories, | 
        
          |  |  |  | classFlags, | 
        
          |  |  |  | pluginVersion, | 
        
          |  |  |  | processorCID, | 
        
          |  |  |  | processorCreateFunc, | 
        
          |  |  |  | controllerCID, | 
        
          |  |  |  | controllerCreateFunc | 
        
          |  | ) |  |  | 
      
 
Value:    {                                                                                             \
        {                                                                                         \
                classFlags, pluginVst3Categories, 0, pluginVersion, kVstVersionString);           \
            gPluginFactory->registerClass (&processorClass, processorCreateFunc);                 \
        }                                                                                         \
        {                                                                                         \
                pluginName, 0, "", 0, pluginVersion, kVstVersionString);                          \
            gPluginFactory->registerClass (&controllerClass, controllerCreateFunc);               \
        }                                                                                         \
    }