LibreOffice Module fpicker (master)  1
Public Member Functions | Private Attributes | List of all members
ComPtr< T_INTERFACE, P_IID, P_CLSID > Class Template Reference

#include <comptr.hxx>

Inheritance diagram for ComPtr< T_INTERFACE, P_IID, P_CLSID >:
[legend]

Public Member Functions

 ComPtr ()
 initialize com ptr with null. More...
 
 ComPtr (T_INTERFACE *pInterface)
 initialize com ptr with given interface. More...
 
 ComPtr (const ComPtr< T_INTERFACE, P_IID, P_CLSID > &aCopy)
 copy ctor. More...
 
 ComPtr (IUnknown *pIUnknown)
 initialize object by querying external object for the right interface. More...
 
 ~ComPtr ()
 deinitialize com object right. More...
 
HRESULT create ()
 
 operator T_INTERFACE * () const
 
T_INTERFACE & operator* () const
 
T_INTERFACE ** operator& ()
 
T_INTERFACE * operator-> () const
 
T_INTERFACE * operator= (T_INTERFACE *pInterface)
 
T_INTERFACE * operator= (IUnknown *pIUnknown)
 
T_INTERFACE * operator= (const ComPtr< T_INTERFACE, P_IID, P_CLSID > &aCopy)
 
T_INTERFACE * get () const
 
void attach (T_INTERFACE *pInterface)
 
T_INTERFACE * detach ()
 
void release ()
 
template<class T_QUERYINTERFACE >
HRESULT query (T_QUERYINTERFACE **pQuery)
 
bool equals (IUnknown *pCheck)
 
bool is ()
 

Private Attributes

T_INTERFACE * m_pInterface
 

Detailed Description

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
class ComPtr< T_INTERFACE, P_IID, P_CLSID >

Definition at line 30 of file comptr.hxx.

Constructor & Destructor Documentation

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::ComPtr ( )
inline

initialize com ptr with null.

Definition at line 37 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::ComPtr ( T_INTERFACE *  pInterface)
inlineexplicit

initialize com ptr with given interface.

Definition at line 45 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::ComPtr ( const ComPtr< T_INTERFACE, P_IID, P_CLSID > &  aCopy)
inline

copy ctor.

Definition at line 55 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::ComPtr ( IUnknown *  pIUnknown)
inlineexplicit

initialize object by querying external object for the right interface.

Definition at line 65 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::~ComPtr ( )
inline

deinitialize com object right.

Definition at line 74 of file comptr.hxx.

Member Function Documentation

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
void ComPtr< T_INTERFACE, P_IID, P_CLSID >::attach ( T_INTERFACE *  pInterface)
inline

Definition at line 150 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
HRESULT ComPtr< T_INTERFACE, P_IID, P_CLSID >::create ( )
inline
template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::detach ( )
inline

Definition at line 160 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
bool ComPtr< T_INTERFACE, P_IID, P_CLSID >::equals ( IUnknown *  pCheck)
inline

Definition at line 183 of file comptr.hxx.

Referenced by ComPtr< IFileDialog, IID_IFileDialog >::operator=().

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::get ( ) const
inline
template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
bool ComPtr< T_INTERFACE, P_IID, P_CLSID >::is ( )
inline
template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator T_INTERFACE * ( ) const
inline

Definition at line 88 of file comptr.hxx.

References ComPtr< T_INTERFACE, P_IID, P_CLSID >::m_pInterface.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE** ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator& ( )
inline

Definition at line 100 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE& ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator* ( ) const
inline

Definition at line 94 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator-> ( ) const
inline

Definition at line 106 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator= ( T_INTERFACE *  pInterface)
inline

Definition at line 112 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator= ( IUnknown *  pIUnknown)
inline

Definition at line 126 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::operator= ( const ComPtr< T_INTERFACE, P_IID, P_CLSID > &  aCopy)
inline

Definition at line 134 of file comptr.hxx.

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
template<class T_QUERYINTERFACE >
HRESULT ComPtr< T_INTERFACE, P_IID, P_CLSID >::query ( T_QUERYINTERFACE **  pQuery)
inline
template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
void ComPtr< T_INTERFACE, P_IID, P_CLSID >::release ( )
inline

Member Data Documentation

template<class T_INTERFACE, REFIID P_IID = IID_NULL, REFCLSID P_CLSID = CLSID_NULL>
T_INTERFACE* ComPtr< T_INTERFACE, P_IID, P_CLSID >::m_pInterface
private

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