Interface Technology Basics: funknown.h File Reference
Author: Steinberg

Interface Technology Basics VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
funknown.h File Reference
`#include "pluginterfaces/base/fplatform.h"`
`#include "pluginterfaces/base/ftypes.h"`
`#include "pluginterfaces/base/smartpointer.h"`
`#include <cstring>`

## Classes
class | FUID
| Handling 16 Byte Globally Unique Identifiers. More...
class | FUnknown
| The basic interface of all interfaces. More...
class | FUnknownPtr< I >
| FUnknownPtr - automatic interface conversion and smart pointer in one. More...
struct | FReleaser
| Release an interface using automatic object (obsolete). More...

## Namespaces
namespace | Steinberg
| This header provides classes for working with FUnknown.
namespace | Steinberg::FUnknownPrivate

## Macros
#define | INLINE_UID(l1, l2, l3, l4)
#define | DECLARE_UID(name, l1, l2, l3, l4)
#define | EXTERN_UID(name)
#define | DECLARE_CLASS_IID(ClassName, l1, l2, l3, l4)
#define | DEF_CLASS_IID(ClassName)
#define | INLINE_UID_OF(ClassName)
#define | INLINE_UID_FROM_FUID(x)
#define | DECLARE_FUNKNOWN_METHODS
#define | DELEGATE_REFCOUNT(ClassName)
#define | IMPLEMENT_REFCOUNT(ClassName)
#define | FUNKNOWN_CTOR { __funknownRefCount = 1; }
#define | FUNKNOWN_DTOR
#define | QUERY_INTERFACE(iid, obj, InterfaceIID, InterfaceName)
#define | IMPLEMENT_QUERYINTERFACE(ClassName, InterfaceName, ClassIID)
#define | IMPLEMENT_FUNKNOWN_METHODS(ClassName, InterfaceName, ClassIID)

## Typedefs
typedef int64 | LARGE_INT
typedef char | TUID[16]
| plain UID type

## Enumerations
enum | { kNoInterface = -1 , kResultOk , kResultTrue = kResultOk , kResultFalse , kInvalidArgument , kNotImplemented , kInternalError , kNotInitialized , kOutOfMemory }

## Functions
SMTG_ALWAYS_INLINE bool | iidEqual (const void *iid1, const void *iid2)
int32 | atomicAdd (int32 &var, int32 d)
template<typename T>
const TUID & | getTUID ()

## Macro Definition Documentation

## ◆ INLINE_UID

#define INLINE_UID | ( |  | l1,
|  |  | l2,
|  |  | l3,
|  |  | l4 )

Value:
{ \
(::Steinberg::int8)(((::Steinberg::uint32)(l1) & 0xFF000000) >> 24), (::Steinberg::int8)(((::Steinberg::uint32)(l1) & 0x00FF0000) >> 16), \
(::Steinberg::int8)(((::Steinberg::uint32)(l1) & 0x0000FF00) >> 8), (::Steinberg::int8)(((::Steinberg::uint32)(l1) & 0x000000FF) ), \
(::Steinberg::int8)(((::Steinberg::uint32)(l2) & 0xFF000000) >> 24), (::Steinberg::int8)(((::Steinberg::uint32)(l2) & 0x00FF0000) >> 16), \
(::Steinberg::int8)(((::Steinberg::uint32)(l2) & 0x0000FF00) >> 8), (::Steinberg::int8)(((::Steinberg::uint32)(l2) & 0x000000FF) ), \
(::Steinberg::int8)(((::Steinberg::uint32)(l3) & 0xFF000000) >> 24), (::Steinberg::int8)(((::Steinberg::uint32)(l3) & 0x00FF0000) >> 16), \
(::Steinberg::int8)(((::Steinberg::uint32)(l3) & 0x0000FF00) >> 8), (::Steinberg::int8)(((::Steinberg::uint32)(l3) & 0x000000FF) ), \
(::Steinberg::int8)(((::Steinberg::uint32)(l4) & 0xFF000000) >> 24), (::Steinberg::int8)(((::Steinberg::uint32)(l4) & 0x00FF0000) >> 16), \
(::Steinberg::int8)(((::Steinberg::uint32)(l4) & 0x0000FF00) >> 8), (::Steinberg::int8)(((::Steinberg::uint32)(l4) & 0x000000FF) ) \
}
Steinberg::uint32
uint32_t uint32
Definition ftypes.h:53
Steinberg::int8
char int8
Definition ftypes.h:45

## ◆ DECLARE_UID

#define DECLARE_UID | ( |  | name,
|  |  | l1,
|  |  | l2,
|  |  | l3,
|  |  | l4 )

Value:
SMTG_CONSTEXPR14 ::Steinberg::TUID name = INLINE_UID (l1, l2, l3, l4);
INLINE_UID
#define INLINE_UID(l1, l2, l3, l4)
Definition funknown.h:49

## ◆ EXTERN_UID

#define EXTERN_UID | ( |  | name | ) |

Value:
extern const ::Steinberg::TUID name;

## ◆ DECLARE_CLASS_IID

#define DECLARE_CLASS_IID | ( |  | ClassName,
|  |  | l1,
|  |  | l2,
|  |  | l3,
|  |  | l4 )

Value:
static SMTG_CONSTEXPR14 const ::Steinberg::TUID ClassName##_iid = INLINE_UID (l1, l2, l3, l4);
SMTG_CONSTEXPR14
#define SMTG_CONSTEXPR14
Definition fplatform.h:312

## ◆ DEF_CLASS_IID

#define DEF_CLASS_IID | ( |  | ClassName | ) |

Value:
const ::Steinberg::FUID ClassName::iid (ClassName##_iid);

## ◆ INLINE_UID_OF

#define INLINE_UID_OF | ( |  | ClassName | ) |

Value:
ClassName##_iid

## ◆ INLINE_UID_FROM_FUID

#define INLINE_UID_FROM_FUID | ( |  | x | ) |

Value:
INLINE_UID (x.getLong1 (), x.getLong2 (), x.getLong3 (), x.getLong4 ())

## ◆ DECLARE_FUNKNOWN_METHODS

#define DECLARE_FUNKNOWN_METHODS

Value:
public: \
virtual ::Steinberg::tresult PLUGIN_API queryInterface (const ::Steinberg::TUID _iid, void** obj) SMTG_OVERRIDE; \
virtual ::Steinberg::uint32 PLUGIN_API addRef () SMTG_OVERRIDE; \
virtual ::Steinberg::uint32 PLUGIN_API release () SMTG_OVERRIDE; \
protected : \
::Steinberg::int32 __funknownRefCount; \
public:
SMTG_OVERRIDE
#define SMTG_OVERRIDE
Definition fplatform.h:300
Steinberg
This header provides classes for working with FUnknown.
Definition conststringtable.cpp:21

## ◆ DELEGATE_REFCOUNT

#define DELEGATE_REFCOUNT | ( |  | ClassName | ) |

Value:
public: \
virtual ::Steinberg::uint32 PLUGIN_API addRef () SMTG_OVERRIDE { return ClassName::addRef (); } \
virtual ::Steinberg::uint32 PLUGIN_API release () SMTG_OVERRIDE { return ClassName::release (); }

## ◆ IMPLEMENT_REFCOUNT

#define IMPLEMENT_REFCOUNT | ( |  | ClassName | ) |

Value:
::Steinberg::uint32 PLUGIN_API ClassName::addRef () \
{ \
return ::Steinberg::FUnknownPrivate::atomicAdd (__funknownRefCount, 1); \
} \
::Steinberg::uint32 PLUGIN_API ClassName::release () \
{ \
if (::Steinberg::FUnknownPrivate::atomicAdd (__funknownRefCount, -1) == 0) \
{ \
delete this; \
return 0; \
} \
return __funknownRefCount; \
}
Steinberg::FUnknownPrivate::atomicAdd
int32 atomicAdd(int32 &var, int32 d)
Definition funknown.cpp:87

## ◆ FUNKNOWN_CTOR

#define FUNKNOWN_CTOR { __funknownRefCount = 1; }

## ◆ FUNKNOWN_DTOR

#define FUNKNOWN_DTOR

## ◆ QUERY_INTERFACE

#define QUERY_INTERFACE | ( |  | iid,
|  |  | obj,
|  |  | InterfaceIID,
|  |  | InterfaceName )

Value:
if (::Steinberg::FUnknownPrivate::iidEqual (iid, InterfaceIID)) \
{ \
addRef (); \
*obj = static_cast< InterfaceName* >(this); \
return ::Steinberg::kResultOk; \
}
Steinberg::FUnknownPrivate::iidEqual
SMTG_ALWAYS_INLINE bool iidEqual(const void *iid1, const void *iid2)
Definition funknown.h:228

## ◆ IMPLEMENT_QUERYINTERFACE

#define IMPLEMENT_QUERYINTERFACE | ( |  | ClassName,
|  |  | InterfaceName,
|  |  | ClassIID )

Value:
::Steinberg::tresult PLUGIN_API ClassName::queryInterface (const ::Steinberg::TUID _iid, void** obj)\
{ \
QUERY_INTERFACE (_iid, obj, ::Steinberg::FUnknown::iid, InterfaceName) \
QUERY_INTERFACE (_iid, obj, ClassIID, InterfaceName) \
*obj = nullptr; \
return ::Steinberg::kNoInterface; \
}
Steinberg::FUnknown::iid
static const FUID iid
Definition funknown.h:396
Steinberg::tresult
int32 tresult
Definition ftypes.h:70

## ◆ IMPLEMENT_FUNKNOWN_METHODS

#define IMPLEMENT_FUNKNOWN_METHODS | ( |  | ClassName,
|  |  | InterfaceName,
|  |  | ClassIID )

Value:
IMPLEMENT_REFCOUNT (ClassName) \
IMPLEMENT_QUERYINTERFACE (ClassName, InterfaceName, ClassIID)
IMPLEMENT_REFCOUNT
#define IMPLEMENT_REFCOUNT(ClassName)
Definition funknown.h:105
Empty

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