JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions
fobject.h File Reference

Basic Object implementing FUnknown. More...

#include "pluginterfaces/base/funknown.h"
#include "pluginterfaces/base/iupdatehandler.h"
#include "base/source/fdebug.h"

Go to the source code of this file.

Classes

class  Steinberg::FObject
 Implements FUnknown and IDependent. More...
 

Namespaces

namespace  Steinberg::Singleton
 Automatic creation and destruction of singleton instances.
 

Macros

#define SMTG_DEPENDENCY_COUNT
 
#define SINGLETON(ClassName)
 
#define OBJ_METHODS(className, baseClass)
 
#define REFCOUNT_METHODS(BaseClass)
 Delegate refcount functions to BaseClass.
 
Macros to implement FUnknown::queryInterface ().

Examples:

class Foo : public FObject, public IFoo2, public IFoo3
{
...
DEF_INTERFACE (IFoo2)
DEF_INTERFACE (IFoo3)
// Implement IFoo2 interface ...
// Implement IFoo3 interface ...
...
};
#define DEFINE_INTERFACES
Start defining interfaces.
Definition fobject.h:387
#define DEF_INTERFACE(InterfaceName)
Add a interfaces.
Definition fobject.h:394
#define END_DEFINE_INTERFACES(BaseClass)
End defining interfaces.
Definition fobject.h:400
#define REFCOUNT_METHODS(BaseClass)
Delegate refcount functions to BaseClass.
Definition fobject.h:360
#define DEFINE_INTERFACES
 Start defining interfaces.
 
#define DEF_INTERFACE(InterfaceName)
 Add a interfaces.
 
#define END_DEFINE_INTERFACES(BaseClass)
 End defining interfaces.
 
Convenient macros to implement Steinberg::FUnknown::queryInterface ().

Examples:

class Foo : public FObject, public IFoo2, public IFoo3
{
...
DEF_INTERFACES_2(IFoo2,IFoo3,FObject)
...
};
#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_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 Steinberg::FClassID = FIDString
 

Functions

template<class C >
C * Steinberg::FCast (const FObject *object)
 FCast overload 1 - FObject to FObject.
 
template<class C >
C * Steinberg::FCast (FUnknown *unknown)
 FCast overload 2 - FUnknown to FObject.
 
template<class C >
C * Steinberg::FUCast (FObject *object)
 FUCast - casting from FUnknown to Interface.
 
template<class C >
C * Steinberg::FUCast (FUnknown *object)
 
template<class T >
void Steinberg::AssignShared (T *&dest, T *newPtr)
 
template<class T >
void Steinberg::AssignSharedDependent (IDependent *_this, T *&dest, T *newPtr)
 
template<class T >
void Steinberg::AssignSharedDependent (IDependent *_this, IPtr< T > &dest, T *newPtr)
 
template<class T >
void Steinberg::SafeReleaseDependent (IDependent *_this, T *&dest)
 
template<class T >
void Steinberg::SafeReleaseDependent (IDependent *_this, IPtr< T > &dest)
 
void Steinberg::Singleton::registerInstance (FObject **o)
 registers an instance (type FObject)
 
bool Steinberg::Singleton::isTerminated ()
 Returns true when singleton instances were already released.
 
void Steinberg::Singleton::lockRegister ()
 lock and unlock the singleton registration for multi-threading safety
 
void Steinberg::Singleton::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 Steinberg::SafeRelease (I *&ptr)
 
template<class I >
void Steinberg::SafeRelease (IPtr< I > &ptr)
 
template<class T >
void Steinberg::SafeDelete (T *&ptr)
 

Detailed Description

Basic Object implementing FUnknown.

Definition in file fobject.h.

Macro Definition Documentation

◆ DEF_INTERFACE

#define DEF_INTERFACE (   InterfaceName)

Add a interfaces.

Definition at line 394 of file fobject.h.

◆ DEF_INTERFACES_1

#define DEF_INTERFACES_1 (   InterfaceName,
  BaseClass 
)

Definition at line 420 of file fobject.h.

◆ DEF_INTERFACES_2

#define DEF_INTERFACES_2 (   InterfaceName1,
  InterfaceName2,
  BaseClass 
)

Definition at line 426 of file fobject.h.

◆ DEF_INTERFACES_3

#define DEF_INTERFACES_3 (   InterfaceName1,
  InterfaceName2,
  InterfaceName3,
  BaseClass 
)

Definition at line 433 of file fobject.h.

◆ DEF_INTERFACES_4

#define DEF_INTERFACES_4 (   InterfaceName1,
  InterfaceName2,
  InterfaceName3,
  InterfaceName4,
  BaseClass 
)

Definition at line 441 of file fobject.h.

◆ DEFINE_INTERFACES

#define DEFINE_INTERFACES

Start defining interfaces.

Definition at line 387 of file fobject.h.

◆ END_DEFINE_INTERFACES

#define END_DEFINE_INTERFACES (   BaseClass)

End defining interfaces.

Definition at line 400 of file fobject.h.

◆ FUNKNOWN_METHODS

#define FUNKNOWN_METHODS (   InterfaceName,
  BaseClass 
)

Definition at line 463 of file fobject.h.

◆ FUNKNOWN_METHODS2

#define FUNKNOWN_METHODS2 (   InterfaceName1,
  InterfaceName2,
  BaseClass 
)

Definition at line 467 of file fobject.h.

◆ FUNKNOWN_METHODS3

#define FUNKNOWN_METHODS3 (   InterfaceName1,
  InterfaceName2,
  InterfaceName3,
  BaseClass 
)

Definition at line 471 of file fobject.h.

◆ FUNKNOWN_METHODS4

#define FUNKNOWN_METHODS4 (   InterfaceName1,
  InterfaceName2,
  InterfaceName3,
  InterfaceName4,
  BaseClass 
)

Definition at line 475 of file fobject.h.

◆ OBJ_METHODS

#define OBJ_METHODS (   className,
  baseClass 
)

Definition at line 348 of file fobject.h.

◆ REFCOUNT_METHODS

#define REFCOUNT_METHODS (   BaseClass)

Delegate refcount functions to BaseClass.

BaseClase must implement ref counting.

Definition at line 360 of file fobject.h.

◆ SINGLETON

#define SINGLETON (   ClassName)

Definition at line 330 of file fobject.h.

◆ SMTG_DEPENDENCY_COUNT

#define SMTG_DEPENDENCY_COUNT

Definition at line 48 of file fobject.h.

Typedef Documentation

◆ FClassID

using Steinberg::FClassID = typedef FIDString

Definition at line 54 of file fobject.h.

Function Documentation

◆ AssignShared()

template<class T >
void Steinberg::AssignShared ( T *&  dest,
T *  newPtr 
)

Definition at line 253 of file fobject.h.

◆ AssignSharedDependent() [1/2]

template<class T >
void Steinberg::AssignSharedDependent ( IDependent _this,
IPtr< T > &  dest,
T *  newPtr 
)

Definition at line 281 of file fobject.h.

◆ AssignSharedDependent() [2/2]

template<class T >
void Steinberg::AssignSharedDependent ( IDependent _this,
T *&  dest,
T *  newPtr 
)

Definition at line 267 of file fobject.h.

◆ FCast() [1/2]

template<class C >
C * Steinberg::FCast ( const FObject object)

FCast overload 1 - FObject to FObject.

Definition at line 167 of file fobject.h.

◆ FCast() [2/2]

template<class C >
C * Steinberg::FCast ( FUnknown unknown)

FCast overload 2 - FUnknown to FObject.

Definition at line 178 of file fobject.h.

◆ FUCast() [1/2]

template<class C >
C * Steinberg::FUCast ( FObject object)

FUCast - casting from FUnknown to Interface.

Definition at line 188 of file fobject.h.

◆ FUCast() [2/2]

template<class C >
C * Steinberg::FUCast ( FUnknown object)

Definition at line 194 of file fobject.h.

◆ SafeDelete()

template<class T >
void Steinberg::SafeDelete ( T *&  ptr)

Definition at line 241 of file fobject.h.

◆ SafeRelease() [1/2]

template<class I >
void Steinberg::SafeRelease ( I *&  ptr)

Definition at line 222 of file fobject.h.

◆ SafeRelease() [2/2]

template<class I >
void Steinberg::SafeRelease ( IPtr< I > &  ptr)

Definition at line 233 of file fobject.h.

◆ SafeReleaseDependent() [1/2]

template<class T >
void Steinberg::SafeReleaseDependent ( IDependent _this,
IPtr< T > &  dest 
)

Definition at line 304 of file fobject.h.

◆ SafeReleaseDependent() [2/2]

template<class T >
void Steinberg::SafeReleaseDependent ( IDependent _this,
T *&  dest 
)

Definition at line 295 of file fobject.h.