Base Module VST 3.7
SDK for developing VST plug-in
|
Basic Object implementing FUnknown. More...
#include "pluginterfaces/base/funknown.h"
#include "pluginterfaces/base/iupdatehandler.h"
#include "base/source/fdebug.h"
Classes | |
class | FObject |
Implements FUnknown and IDependent. More... | |
Namespaces | |
namespace | Steinberg |
namespace | Steinberg::Singleton |
Automatic creation and destruction of singleton instances. | |
Macros | |
#define | SMTG_DEPENDENCY_COUNT DEVELOPMENT |
#define | SINGLETON(ClassName) |
#define | OBJ_METHODS(className, baseClass) |
#define | REFCOUNT_METHODS(BaseClass) |
Delegate refcount functions to BaseClass. More... | |
Macros to implement FUnknown::queryInterface (). | |
Examples: class Foo : public FObject, public IFoo2, public IFoo3
{
...
DEF_INTERFACE (IFoo2)
DEF_INTERFACE (IFoo3)
END_DEFINE_INTERFACES (FObject)
REFCOUNT_METHODS(FObject)
// Implement IFoo2 interface ...
// Implement IFoo3 interface ...
...
};
#define END_DEFINE_INTERFACES(BaseClass) End defining interfaces. Definition: fobject.h:452 #define REFCOUNT_METHODS(BaseClass) Delegate refcount functions to BaseClass. Definition: fobject.h:412 | |
#define | DEFINE_INTERFACES |
Start defining interfaces. More... | |
#define | DEF_INTERFACE(InterfaceName) QUERY_INTERFACE (iid, obj, InterfaceName::iid, InterfaceName) |
Add a interfaces. More... | |
#define | END_DEFINE_INTERFACES(BaseClass) |
End defining interfaces. More... | |
Convenient macros to implement Steinberg::FUnknown::queryInterface (). | |
Examples: class Foo : public FObject, public IFoo2, public IFoo3
{
...
DEF_INTERFACES_2(IFoo2,IFoo3,FObject)
REFCOUNT_METHODS(FObject)
...
};
#define DEF_INTERFACES_2(InterfaceName1, InterfaceName2, BaseClass) Definition: fobject.h:478 | |
#define | DEF_INTERFACES_1(InterfaceName, BaseClass) |
#define | DEF_INTERFACES_2(InterfaceName1, InterfaceName2, BaseClass) |
#define | DEF_INTERFACES_3(InterfaceName1, InterfaceName2, InterfaceName3, BaseClass) |
#define | DEF_INTERFACES_4(InterfaceName1, InterfaceName2, InterfaceName3, InterfaceName4, BaseClass) |
Convenient macros to implement Steinberg::FUnknown methods. | |
Examples: class Foo : public FObject, public IFoo2, public IFoo3
{
...
FUNKNOWN_METHODS2(IFoo2,IFoo3,FObject)
...
};
#define FUNKNOWN_METHODS2(InterfaceName1, InterfaceName2, BaseClass) Definition: fobject.h:519 | |
#define | FUNKNOWN_METHODS(InterfaceName, BaseClass) |
#define | FUNKNOWN_METHODS2(InterfaceName1, InterfaceName2, BaseClass) |
#define | FUNKNOWN_METHODS3(InterfaceName1, InterfaceName2, InterfaceName3, BaseClass) |
#define | FUNKNOWN_METHODS4(InterfaceName1, InterfaceName2, InterfaceName3, InterfaceName4, BaseClass) |
Typedefs | |
using | FClassID = FIDString |
Functions | |
template<class C > | |
C * | FCast (const FObject *object) |
FCast overload 1 - FObject to FObject. More... | |
template<class C > | |
C * | FCast (FUnknown *unknown) |
FCast overload 2 - FUnknown to FObject. More... | |
template<class I > | |
IPtr< I > | ICast (FObject *object) |
ICast - casting from FObject to FUnknown Interface. More... | |
template<class I > | |
IPtr< I > | ICast (FUnknown *object) |
ICast - casting from FUnknown to another FUnknown Interface. More... | |
template<class C > | |
C * | FCastIsA (const FObject *object) |
template<class C > | |
SMTG_DEPRECATED_MSG ("use ICast<>") inline C *FUCast(FObject *object) | |
template<class T > | |
void | AssignShared (T *&dest, T *newPtr) |
template<class T > | |
void | AssignSharedDependent (IDependent *_this, T *&dest, T *newPtr) |
template<class T > | |
void | AssignSharedDependent (IDependent *_this, IPtr< T > &dest, T *newPtr) |
template<class T > | |
void | SafeReleaseDependent (IDependent *_this, T *&dest) |
template<class T > | |
void | SafeReleaseDependent (IDependent *_this, IPtr< T > &dest) |
void | registerInstance (FObject **o) |
registers an instance (type FObject) More... | |
bool | isTerminated () |
Returns true when singleton instances were already released. More... | |
void | lockRegister () |
lock and unlock the singleton registration for multi-threading safety More... | |
void | unlockRegister () |
Convenience methods that call release or delete respectively | |
on a pointer if it is non-zero, and then set the pointer to zero. Note: you should prefer using IPtr or OPtr instead of these methods whenever possible. Examples: ~Foo ()
{
// instead of ...
if (somePointer)
{
somePointer->release ();
somePointer = 0;
}
// ... just being lazy I write
SafeRelease (somePointer)
}
| |
template<class I > | |
void | SafeRelease (I *&ptr) |
template<class I > | |
void | SafeRelease (IPtr< I > &ptr) |
template<class T > | |
void | SafeDelete (T *&ptr) |
Basic Object implementing FUnknown.
#define SMTG_DEPENDENCY_COUNT DEVELOPMENT |
#define SINGLETON | ( | ClassName | ) |
#define OBJ_METHODS | ( | className, | |
baseClass | |||
) |
#define REFCOUNT_METHODS | ( | BaseClass | ) |
Delegate refcount functions to BaseClass.
BaseClase must implement ref counting.
#define DEFINE_INTERFACES |
Start defining interfaces.
#define DEF_INTERFACE | ( | InterfaceName | ) | QUERY_INTERFACE (iid, obj, InterfaceName::iid, InterfaceName) |
Add a interfaces.
#define END_DEFINE_INTERFACES | ( | BaseClass | ) |
End defining interfaces.
#define DEF_INTERFACES_1 | ( | InterfaceName, | |
BaseClass | |||
) |
#define DEF_INTERFACES_2 | ( | InterfaceName1, | |
InterfaceName2, | |||
BaseClass | |||
) |
#define DEF_INTERFACES_3 | ( | InterfaceName1, | |
InterfaceName2, | |||
InterfaceName3, | |||
BaseClass | |||
) |
#define DEF_INTERFACES_4 | ( | InterfaceName1, | |
InterfaceName2, | |||
InterfaceName3, | |||
InterfaceName4, | |||
BaseClass | |||
) |
#define FUNKNOWN_METHODS | ( | InterfaceName, | |
BaseClass | |||
) |
#define FUNKNOWN_METHODS2 | ( | InterfaceName1, | |
InterfaceName2, | |||
BaseClass | |||
) |
#define FUNKNOWN_METHODS3 | ( | InterfaceName1, | |
InterfaceName2, | |||
InterfaceName3, | |||
BaseClass | |||
) |
#define FUNKNOWN_METHODS4 | ( | InterfaceName1, | |
InterfaceName2, | |||
InterfaceName3, | |||
InterfaceName4, | |||
BaseClass | |||
) |