Interface Technology Basics: FUnknownPtr< I > Class Template Reference
Author: Steinberg

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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | List of all members
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 ()
FUnknownPtr & | operator= (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)
IPtr & | operator= (const IPtr &other)
template<class T >
IPtr & | operator= (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)
...

## 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 ©2022 Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.