JUCE  v5.1.1-3-g1a0b28c73
JUCE API
ComSmartPtr< ObjectType > Class Template Reference

A simple COM smart pointer. More...

#include <juce_win32_ComSmartPtr.h>

Inheritance diagram for ComSmartPtr< ObjectType >:
Collaboration diagram for ComSmartPtr< ObjectType >:

Public Member Functions

 ComSmartPtr () noexcept
 
 ComSmartPtr (ComClass *obj)
 
 ComSmartPtr (const ComSmartPtr &other)
 
 ComSmartPtr () noexcept
 
 ComSmartPtr (ObjectType *object, bool autoAddRef=true) noexcept
 
 ComSmartPtr (const ComSmartPtr &other) noexcept
 
 ~ComSmartPtr ()
 
 ~ComSmartPtr ()
 
HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext=CLSCTX_INPROC_SERVER)
 
ObjectType * get () const noexcept
 
bool loadFrom (Steinberg::FUnknown *o)
 
bool loadFrom (Steinberg::IPluginFactory *factory, const Steinberg::TUID &uuid)
 
 operator ComClass * () const noexcept
 
 operator ObjectType * () const noexcept
 
bool operator!= (ObjectType *const other) noexcept
 
ComClassoperator* () const noexcept
 
ObjectType & operator* () const noexcept
 
ComClassoperator-> () const noexcept
 
ObjectType * operator-> () const noexcept
 
ComSmartPtroperator= (ComClass *const newP)
 
ComSmartPtroperator= (const ComSmartPtr &newP)
 
ComSmartPtroperator= (const ComSmartPtr &other)
 
ComSmartPtroperator= (ObjectType *const newObjectToTakePossessionOf)
 
bool operator== (ObjectType *const other) noexcept
 
template<class OtherComClass >
HRESULT QueryInterface (REFCLSID classUUID, ComSmartPtr< OtherComClass > &destObject) const
 
template<class OtherComClass >
HRESULT QueryInterface (ComSmartPtr< OtherComClass > &destObject) const
 
ComClass ** resetAndGetPointerAddress ()
 

Private Member Functions

ComClass ** operator & () noexcept
 
void release ()
 

Private Attributes

ComClassp = nullptr
 
ObjectType * source
 

Detailed Description

template<class ObjectType>
class ComSmartPtr< ObjectType >

A simple COM smart pointer.

Constructor & Destructor Documentation

◆ ComSmartPtr() [1/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( )
inlinenoexcept

◆ ComSmartPtr() [2/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( ObjectType *  object,
bool  autoAddRef = true 
)
inlinenoexcept

◆ ComSmartPtr() [3/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( const ComSmartPtr< ObjectType > &  other)
inlinenoexcept

◆ ~ComSmartPtr() [1/2]

template<class ObjectType>
ComSmartPtr< ObjectType >::~ComSmartPtr ( )
inline

◆ ComSmartPtr() [4/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( )
inlinenoexcept

◆ ComSmartPtr() [5/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( ComClass obj)
inline

◆ ComSmartPtr() [6/6]

template<class ObjectType>
ComSmartPtr< ObjectType >::ComSmartPtr ( const ComSmartPtr< ObjectType > &  other)
inline

◆ ~ComSmartPtr() [2/2]

template<class ObjectType>
ComSmartPtr< ObjectType >::~ComSmartPtr ( )
inline

Member Function Documentation

◆ CoCreateInstance()

template<class ObjectType>
HRESULT ComSmartPtr< ObjectType >::CoCreateInstance ( REFCLSID  classUUID,
DWORD  dwClsContext = CLSCTX_INPROC_SERVER 
)
inline

◆ get()

template<class ObjectType>
ObjectType* ComSmartPtr< ObjectType >::get ( ) const
inlinenoexcept

◆ loadFrom() [1/2]

template<class ObjectType>
bool ComSmartPtr< ObjectType >::loadFrom ( Steinberg::FUnknown *  o)
inline

◆ loadFrom() [2/2]

template<class ObjectType>
bool ComSmartPtr< ObjectType >::loadFrom ( Steinberg::IPluginFactory *  factory,
const Steinberg::TUID &  uuid 
)
inline

◆ operator &()

template<class ObjectType>
ComClass** ComSmartPtr< ObjectType >::operator& ( )
privatenoexcept

◆ operator ComClass *()

template<class ObjectType>
ComSmartPtr< ObjectType >::operator ComClass * ( ) const
inlinenoexcept

◆ operator ObjectType *()

template<class ObjectType>
ComSmartPtr< ObjectType >::operator ObjectType * ( ) const
inlinenoexcept

◆ operator!=()

template<class ObjectType>
bool ComSmartPtr< ObjectType >::operator!= ( ObjectType *const  other)
inlinenoexcept

◆ operator*() [1/2]

template<class ObjectType>
ComClass& ComSmartPtr< ObjectType >::operator* ( ) const
inlinenoexcept

◆ operator*() [2/2]

template<class ObjectType>
ObjectType& ComSmartPtr< ObjectType >::operator* ( ) const
inlinenoexcept

◆ operator->() [1/2]

template<class ObjectType>
ComClass* ComSmartPtr< ObjectType >::operator-> ( ) const
inlinenoexcept

◆ operator->() [2/2]

template<class ObjectType>
ObjectType* ComSmartPtr< ObjectType >::operator-> ( ) const
inlinenoexcept

◆ operator=() [1/4]

template<class ObjectType>
ComSmartPtr& ComSmartPtr< ObjectType >::operator= ( ComClass *const  newP)
inline

◆ operator=() [2/4]

template<class ObjectType>
ComSmartPtr& ComSmartPtr< ObjectType >::operator= ( const ComSmartPtr< ObjectType > &  newP)
inline

◆ operator=() [3/4]

template<class ObjectType>
ComSmartPtr& ComSmartPtr< ObjectType >::operator= ( const ComSmartPtr< ObjectType > &  other)
inline

◆ operator=() [4/4]

template<class ObjectType>
ComSmartPtr& ComSmartPtr< ObjectType >::operator= ( ObjectType *const  newObjectToTakePossessionOf)
inline

◆ operator==()

template<class ObjectType>
bool ComSmartPtr< ObjectType >::operator== ( ObjectType *const  other)
inlinenoexcept

◆ QueryInterface() [1/2]

template<class ObjectType>
template<class OtherComClass >
HRESULT ComSmartPtr< ObjectType >::QueryInterface ( REFCLSID  classUUID,
ComSmartPtr< OtherComClass > &  destObject 
) const
inline

◆ QueryInterface() [2/2]

template<class ObjectType>
template<class OtherComClass >
HRESULT ComSmartPtr< ObjectType >::QueryInterface ( ComSmartPtr< OtherComClass > &  destObject) const
inline

◆ release()

template<class ObjectType>
void ComSmartPtr< ObjectType >::release ( )
inlineprivate

◆ resetAndGetPointerAddress()

Member Data Documentation

◆ p

template<class ObjectType>
ComClass* ComSmartPtr< ObjectType >::p = nullptr
private

◆ source

template<class ObjectType>
ObjectType* ComSmartPtr< ObjectType >::source
private

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