Interface Technology Basics VST 3.7
SDK for developing VST plug-in
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 &)
 
template<class T >
 IPtr (const IPtr< T > &other)
 
 IPtr ()
 
 ~IPtr ()
 
I * operator= (I *ptr)
 
IPtroperator= (const IPtr &other)
 
template<class T >
IPtroperator= (const IPtr< T > &other)
 
 operator I* () const
 
I * operator-> () const
 
I * get () const
 
void reset (I *obj=nullptr)
 
I * take () SMTG_NOEXCEPT
 
template<class I >
 IPtr (const IPtr< I > &other)
 
template<class I >
IPtr< I > & operator= (const IPtr< I > &_ptr)
 

Additional Inherited Members

- Static Public Member Functions inherited from IPtr< I >
template<typename T >
static IPtr< T > adopt (T *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)
...
IPtr< I > owned(I *p)
Assigning newly created object to an IPtr.
Definition: smartpointer.h:241

Constructor & Destructor Documentation

◆ FUnknownPtr() [1/3]

FUnknownPtr ( FUnknown unknown)
inline

◆ FUnknownPtr() [2/3]

FUnknownPtr ( const FUnknownPtr< I > &  p)
inline

◆ FUnknownPtr() [3/3]

FUnknownPtr ( )
inline

Member Function Documentation

◆ operator=() [1/2]

FUnknownPtr & operator= ( const FUnknownPtr< I > &  p)
inline

◆ operator=() [2/2]

I * operator= ( FUnknown unknown)
inline

◆ getInterface()

I * getInterface ( )
inline
Empty

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