LMMS
Loading...
Searching...
No Matches
Steinberg::IPtr< I > Class Template Reference

#include <smartpointer.h>

Inheritance diagram for Steinberg::IPtr< I >:
Steinberg::FUnknownPtr< I > Steinberg::OPtr< 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

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/4]

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

◆ IPtr() [2/4]

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

◆ IPtr() [3/4]

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

◆ IPtr() [4/4]

template<class I>
Steinberg::IPtr< I >::IPtr ( )
inline

◆ ~IPtr()

template<class I>
Steinberg::IPtr< I >::~IPtr ( )
inline

Member Function Documentation

◆ adopt()

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

◆ get()

template<class I>
I * Steinberg::IPtr< I >::get ( ) const
inline

◆ operator I*()

template<class I>
Steinberg::IPtr< I >::operator I* ( ) const
inline

◆ operator->()

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

◆ operator=() [1/3]

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

◆ operator=() [2/3]

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

◆ operator=() [3/3]

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

◆ reset()

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

◆ take()

template<class I>
I * Steinberg::IPtr< I >::take ( )
inline

Member Data Documentation

◆ ptr

template<class I>
I* Steinberg::IPtr< I >::ptr
protected

The documentation for this class was generated from the following file: