Interface Technology Basics VST 3.7
SDK for developing VST plug-in
Loading...
Searching...
No Matches
IPtr< I > Class Template Reference

IPtr - Smart pointer template class. More...

#include <smartpointer.h>

+ Inheritance diagram for IPtr< I >:

Public Member Functions

 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)
 

Static Public Member Functions

template<typename T>
static IPtr< T > adopt (T *obj) SMTG_NOEXCEPT
 

Protected Attributes

I * ptr
 

Detailed Description

template<class I>
class Steinberg::IPtr< I >

IPtr - Smart pointer template class.

  • can be used as an I* pointer
  • handles refCount of the interface
  • Usage example:
    IPtr<IPath> path (sharedPath);
    if (path)
    path->ascend ();
    IPtr(I *ptr, bool addRef=true)
    Definition smartpointer.h:126

Constructor & Destructor Documentation

◆ IPtr() [1/5]

template<class I>
IPtr ( I * ptr,
bool addRef = true )
inline

◆ IPtr() [2/5]

template<class I>
IPtr ( const IPtr< I > & )
inline

◆ IPtr() [3/5]

template<class I>
template<class T>
IPtr ( const IPtr< T > & other)
inline

◆ IPtr() [4/5]

template<class I>
IPtr ( )
inline

◆ ~IPtr()

template<class I>
~IPtr ( )
inline

◆ IPtr() [5/5]

template<class I>
template<class I>
IPtr ( const IPtr< I > & other)
inline

Member Function Documentation

◆ operator=() [1/4]

template<class I>
I * operator= ( I * ptr)
inline

◆ operator=() [2/4]

template<class I>
IPtr & operator= ( const IPtr< I > & other)
inline

◆ operator=() [3/4]

template<class I>
template<class T>
IPtr & operator= ( const IPtr< T > & other)
inline

◆ operator I*()

template<class I>
operator I* ( ) const
inline

◆ operator->()

template<class I>
I * operator-> ( ) const
inline

◆ get()

template<class I>
I * get ( ) const
inline

◆ reset()

template<class I>
void reset ( I * obj = nullptr)
inline

◆ take()

template<class I>
I * take ( )
inline

◆ adopt()

template<class I>
template<typename T>
static IPtr< T > adopt ( T * obj)
inlinestatic

◆ operator=() [4/4]

template<class I>
template<class I>
IPtr< I > & operator= ( const IPtr< I > & _ptr)
inline

Member Data Documentation

◆ ptr

template<class I>
I* ptr
protected
Empty

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