VST 3 SDK VST 3.7
SDK for developing VST plug-in
CPluginFactory Class Reference

Default Class Factory implementation. More...

#include <pluginfactory.h>

+ Inheritance diagram for CPluginFactory:

Public Member Functions

 CPluginFactory (const PFactoryInfo &info)
 
virtual ~CPluginFactory ()
 
bool registerClass (const PClassInfo *info, FUnknown *(*createFunc)(void *), void *context=nullptr)
 Registers a plug-in class with classInfo version 1, returns true for success. More...
 
bool registerClass (const PClassInfo2 *info, FUnknown *(*createFunc)(void *), void *context=nullptr)
 Registers a plug-in class with classInfo version 2, returns true for success. More...
 
bool registerClass (const PClassInfoW *info, FUnknown *(*createFunc)(void *), void *context=nullptr)
 Registers a plug-in class with classInfo Unicode version, returns true for success. More...
 
bool isClassRegistered (const FUID &cid)
 Check if a class for a given classId is already registered. More...
 
void removeAllClasses ()
 Remove all classes (no class exported) More...
 
DECLARE_FUNKNOWN_METHODS tresult getFactoryInfo (PFactoryInfo *info) SMTG_OVERRIDE
 
int32 countClasses () SMTG_OVERRIDE
 
tresult getClassInfo (int32 index, PClassInfo *info) SMTG_OVERRIDE
 
tresult createInstance (FIDString cid, FIDString _iid, void **obj) SMTG_OVERRIDE
 
tresult getClassInfo2 (int32 index, PClassInfo2 *info) SMTG_OVERRIDE
 
tresult getClassInfoUnicode (int32 index, PClassInfoW *info) SMTG_OVERRIDE
 
tresult setHostContext (FUnknown *context) SMTG_OVERRIDE
 
virtual tresult getClassInfoUnicode (int32 index, PClassInfoW *info)=0
 
virtual tresult setHostContext (FUnknown *context)=0
 
virtual tresult getClassInfo2 (int32 index, PClassInfo2 *info)=0
 
virtual tresult getFactoryInfo (PFactoryInfo *info)=0
 
virtual int32 countClasses ()=0
 
virtual tresult getClassInfo (int32 index, PClassInfo *info)=0
 
virtual tresult createInstance (FIDString cid, FIDString _iid, void **obj)=0
 
- Public Member Functions inherited from FUnknown
virtual tresult queryInterface (const TUID _iid, void **obj)=0
 
virtual uint32 addRef ()=0
 
virtual uint32 release ()=0
 

Protected Member Functions

bool growClasses ()
 

Protected Attributes

PFactoryInfo factoryInfo
 
PClassEntry * classes
 
int32 classCount
 
int32 maxClassCount
 

Additional Inherited Members

- Static Public Attributes inherited from IPluginFactory3
static const FUID iid
 
- Static Public Attributes inherited from IPluginFactory2
static const FUID iid
 
- Static Public Attributes inherited from IPluginFactory
static const FUID iid
 
- Static Public Attributes inherited from FUnknown
static const FUID iid
 

Detailed Description

Default Class Factory implementation.

See also
Macros for defining the class factory

Constructor & Destructor Documentation

◆ CPluginFactory()

CPluginFactory ( const PFactoryInfo info)

◆ ~CPluginFactory()

virtual ~CPluginFactory ( )
virtual

Member Function Documentation

◆ registerClass() [1/3]

bool registerClass ( const PClassInfo info,
FUnknown *(*)(void *)  createFunc,
void *  context = nullptr 
)

Registers a plug-in class with classInfo version 1, returns true for success.

◆ registerClass() [2/3]

bool registerClass ( const PClassInfo2 info,
FUnknown *(*)(void *)  createFunc,
void *  context = nullptr 
)

Registers a plug-in class with classInfo version 2, returns true for success.

◆ registerClass() [3/3]

bool registerClass ( const PClassInfoW info,
FUnknown *(*)(void *)  createFunc,
void *  context = nullptr 
)

Registers a plug-in class with classInfo Unicode version, returns true for success.

◆ isClassRegistered()

bool isClassRegistered ( const FUID cid)

Check if a class for a given classId is already registered.

◆ removeAllClasses()

void removeAllClasses ( )

Remove all classes (no class exported)

◆ getFactoryInfo()

DECLARE_FUNKNOWN_METHODS tresult getFactoryInfo ( PFactoryInfo info)
virtual

Implements IPluginFactory.

◆ countClasses()

int32 countClasses ( )
virtual

Implements IPluginFactory.

◆ getClassInfo()

tresult getClassInfo ( int32  index,
PClassInfo info 
)
virtual

Implements IPluginFactory.

◆ createInstance()

tresult createInstance ( FIDString  cid,
FIDString  _iid,
void **  obj 
)
virtual

Implements IPluginFactory.

◆ getClassInfo2()

tresult getClassInfo2 ( int32  index,
PClassInfo2 info 
)
virtual

Implements IPluginFactory2.

◆ getClassInfoUnicode()

tresult getClassInfoUnicode ( int32  index,
PClassInfoW info 
)
virtual

Implements IPluginFactory3.

◆ setHostContext()

tresult setHostContext ( FUnknown context)
virtual

Implements IPluginFactory3.

◆ growClasses()

bool growClasses ( )
protected

Member Data Documentation

◆ factoryInfo

PFactoryInfo factoryInfo
protected

◆ classes

PClassEntry* classes
protected

◆ classCount

int32 classCount
protected

◆ maxClassCount

int32 maxClassCount
protected
Empty

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