#include <string.h>
#include "ftypes.h"
Data Structures | |
class | FUID |
Handling 16 Byte Globaly Unique Identifiers. More... | |
class | FUnknown |
The basic interface of all interfaces. More... | |
class | IPtr< I > |
IPtr - Smart pointer template class. More... | |
class | OPtr< I > |
OPtr - "owning" smart pointer used for newly created FObjects. More... | |
class | FUnknownPtr< I > |
FUnknownPtr - automatic interface conversion and smart pointer in one. More... | |
class | FVariant |
A Value of variable type. More... | |
struct | FReleaser |
Release an interface using automatic object (obsolete). More... | |
Namespaces | |
namespace | Steinberg |
Defines | |
#define | COM_COMPATIBLE 0 |
#define | PLUGIN_API |
#define | INLINE_UID(l1, l2, l3, l4) |
#define | DECLARE_UID(name, l1, l2, l3, l4) ::Steinberg::TUID name = INLINE_UID (l1, l2, l3, l4); |
#define | EXTERN_UID(name) extern const ::Steinberg::TUID name; |
#define | DECLARE_CLASS_IID(ClassName, l1, l2, l3, l4) static const ::Steinberg::TUID ClassName##_iid = INLINE_UID (l1, l2, l3, l4); |
#define | DEF_CLASS_IID(ClassName) const ::Steinberg::FUID ClassName::iid (ClassName##_iid); |
#define | INLINE_UID_OF(ClassName) ClassName##_iid |
#define | INLINE_UID_FROM_FUID(x) INLINE_UID(x.getLong1 (), x.getLong2 (), x.getLong3 (), x.getLong4 ()) |
#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 int8 | TUID [16] |
plain UID type | |
Enumerations | |
enum | { kNoInterface = -1, kResultOk, kResultTrue = kResultOk, kResultFalse, kInvalidArgument, kNotImplemented, kInternalError, kNotInitialized, kOutOfMemory } |
Functions | |
template<class I > | |
IPtr< I > | owned (I *p) |
Assigning newly created object to an IPtr. |
#define COM_COMPATIBLE 0 |
#define PLUGIN_API |
#define INLINE_UID | ( | l1, | |||
l2, | |||||
l3, | |||||
l4 | ) |
{ \ (::Steinberg::int8)((l1 & 0xFF000000) >> 24), (::Steinberg::int8)((l1 & 0x00FF0000) >> 16), \ (::Steinberg::int8)((l1 & 0x0000FF00) >> 8), (::Steinberg::int8)((l1 & 0x000000FF) ), \ (::Steinberg::int8)((l2 & 0xFF000000) >> 24), (::Steinberg::int8)((l2 & 0x00FF0000) >> 16), \ (::Steinberg::int8)((l2 & 0x0000FF00) >> 8), (::Steinberg::int8)((l2 & 0x000000FF) ), \ (::Steinberg::int8)((l3 & 0xFF000000) >> 24), (::Steinberg::int8)((l3 & 0x00FF0000) >> 16), \ (::Steinberg::int8)((l3 & 0x0000FF00) >> 8), (::Steinberg::int8)((l3 & 0x000000FF) ), \ (::Steinberg::int8)((l4 & 0xFF000000) >> 24), (::Steinberg::int8)((l4 & 0x00FF0000) >> 16), \ (::Steinberg::int8)((l4 & 0x0000FF00) >> 8), (::Steinberg::int8)((l4 & 0x000000FF) ) \ }
#define DECLARE_UID | ( | name, | |||
l1, | |||||
l2, | |||||
l3, | |||||
l4 | ) | ::Steinberg::TUID name = INLINE_UID (l1, l2, l3, l4); |
#define EXTERN_UID | ( | name | ) | extern const ::Steinberg::TUID name; |
#define DECLARE_CLASS_IID | ( | ClassName, | |||
l1, | |||||
l2, | |||||
l3, | |||||
l4 | ) | static const ::Steinberg::TUID ClassName##_iid = INLINE_UID (l1, l2, l3, l4); |
#define DEF_CLASS_IID | ( | ClassName | ) | const ::Steinberg::FUID ClassName::iid (ClassName##_iid); |
#define INLINE_UID_OF | ( | ClassName | ) | ClassName##_iid |
#define INLINE_UID_FROM_FUID | ( | x | ) | INLINE_UID(x.getLong1 (), x.getLong2 (), x.getLong3 (), x.getLong4 ()) |
#define DECLARE_FUNKNOWN_METHODS |
public: \ virtual ::Steinberg::tresult PLUGIN_API queryInterface (const ::Steinberg::TUID iid, void** obj); \ virtual ::Steinberg::uint32 PLUGIN_API addRef (); \ virtual ::Steinberg::uint32 PLUGIN_API release (); \ protected : \ ::Steinberg::int32 __funknownRefCount; \ public:
#define DELEGATE_REFCOUNT | ( | ClassName | ) |
public: \ virtual ::Steinberg::uint32 PLUGIN_API addRef () { return ClassName::addRef (); } \ virtual ::Steinberg::uint32 PLUGIN_API release () { return ClassName::release (); } \
#define IMPLEMENT_REFCOUNT | ( | ClassName | ) |
::Steinberg::uint32 PLUGIN_API ClassName::addRef () \ { \ return ::Steinberg::FUnknown::atomicAdd (__funknownRefCount, 1); \ } \ ::Steinberg::uint32 PLUGIN_API ClassName::release () \ { \ if (::Steinberg::FUnknown::atomicAdd (__funknownRefCount, -1) == 0)\ { \ delete this; \ return 0; \ } \ return __funknownRefCount; \ }
#define FUNKNOWN_CTOR { __funknownRefCount = 1; } |
#define FUNKNOWN_DTOR |
#define QUERY_INTERFACE | ( | iid, | |||
obj, | |||||
InterfaceIID, | |||||
InterfaceName | ) |
if (memcmp (iid, InterfaceIID, sizeof (::Steinberg::TUID)) == 0)\ { \ addRef (); \ *obj = static_cast< InterfaceName* >(this); \ return ::Steinberg::kResultOk; \ }
#define IMPLEMENT_QUERYINTERFACE | ( | ClassName, | |||
InterfaceName, | |||||
ClassIID | ) |
::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 = 0; \ return ::Steinberg::kNoInterface; \ }
#define IMPLEMENT_FUNKNOWN_METHODS | ( | ClassName, | |||
InterfaceName, | |||||
ClassIID | ) |
IMPLEMENT_REFCOUNT (ClassName) \ IMPLEMENT_QUERYINTERFACE (ClassName, InterfaceName, ClassIID)