Interface Technology Basics  VST 3.6.14
SDK for developing VST Plug-in
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FUnknownPtr< I > Class Template Reference

FUnknownPtr - automatic interface conversion and smart pointer in one. More...

#include <funknown.h>

+ Inheritance diagram for FUnknownPtr< I >:

Public Member Functions

 FUnknownPtr (FUnknown *unknown)
 
 FUnknownPtr (const FUnknownPtr &p)
 
 FUnknownPtr ()
 
FUnknownPtroperator= (const FUnknownPtr &p)
 
I * operator= (FUnknown *unknown)
 
I * getInterface ()
 
- Public Member Functions inherited from IPtr< I >
 IPtr (I *ptr, bool addRef=true)
 
 IPtr (const IPtr &)
 
 IPtr (const IPtr< I > &other)
 
 IPtr ()
 
 ~IPtr ()
 
I * operator= (I *ptr)
 
IPtroperator= (const IPtr &other)
 
IPtroperator= (const IPtr< I > &other)
 
 operator I * () const
 
I * operator-> () const
 
I * get () const
 
void reset (I *obj=nullptr)
 
I * take () SMTG_NOEXCEPT
 

Additional Inherited Members

- Static Public Member Functions inherited from IPtr< I >
static IPtr< I > adopt (I *obj) SMTG_NOEXCEPT
 
- Protected Attributes inherited from IPtr< I >
I * ptr
 

Detailed Description

template<class I>
class Steinberg::FUnknownPtr< I >

FUnknownPtr - automatic interface conversion and smart pointer in one.

This template class can be used for interface conversion like this:

IPtr<IPath> path = owned (FHostCreate (IPath, hostClasses));
FUnknownPtr<IPath2> path2 (path); // does a query interface for IPath2
if (path2)
...

Constructor & Destructor Documentation

FUnknownPtr ( FUnknown unknown)
inline
FUnknownPtr ( const FUnknownPtr< I > &  p)
inline
FUnknownPtr ( )
inline

Member Function Documentation

FUnknownPtr& operator= ( const FUnknownPtr< I > &  p)
inline
I * operator= ( FUnknown unknown)
inline
I* getInterface ( )
inline
Empty

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