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:

Defines

#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

Define 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); \
#define DEF_CLASS ( cid,
cardinality,
category,
name,
createMethod   ) 
Value:
{ TUID lcid = cid; static PClassInfo componentClass (lcid,cardinality,category,name); \
   gPluginFactory->registerClass (&componentClass,createMethod); }
#define DEF_CLASS1 ( cid,
cardinality,
category,
name,
createMethod   ) 
Value:
{ static PClassInfo componentClass (cid,cardinality,category,name); \
   gPluginFactory->registerClass (&componentClass,createMethod); }
#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); }
#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); }
#define END_FACTORY
Value:
} else gPluginFactory->addRef (); \
   return gPluginFactory; }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
Empty

Copyright ©2013 Steinberg Media Technologies GmbH. All Rights Reserved.