LibreOffice Module canvas (master)  1
Public Types | Public Member Functions | Private Attributes | List of all members
dxcanvas::COMReference< T > Class Template Reference

COM object RAII wrapper. More...

#include <dx_winstuff.hxx>

Inheritance diagram for dxcanvas::COMReference< T >:
[legend]
Collaboration diagram for dxcanvas::COMReference< T >:
[legend]

Public Types

typedef T Wrappee
 

Public Member Functions

 COMReference ()
 
 COMReference (T *p)
 
 COMReference (const COMReference &rNew)
 
COMReferenceoperator= (const COMReference &rRHS)
 
 ~COMReference ()
 
int reset ()
 
bool is () const
 
T * get () const
 
T * operator-> () const
 
T & operator* () const
 

Private Attributes

T * mp
 

Detailed Description

template<typename T>
class dxcanvas::COMReference< T >

COM object RAII wrapper.

This template wraps a Windows COM object, transparently handling lifetime issues the C++ way (i.e. releasing the reference when the object is destroyed)

Definition at line 73 of file dx_winstuff.hxx.

Member Typedef Documentation

template<typename T>
typedef T dxcanvas::COMReference< T >::Wrappee

Definition at line 76 of file dx_winstuff.hxx.

Constructor & Destructor Documentation

template<typename T>
dxcanvas::COMReference< T >::COMReference ( )
inline

Definition at line 78 of file dx_winstuff.hxx.

template<typename T>
dxcanvas::COMReference< T >::COMReference ( T *  p)
inlineexplicit

Definition at line 99 of file dx_winstuff.hxx.

template<typename T>
dxcanvas::COMReference< T >::COMReference ( const COMReference< T > &  rNew)
inline

Definition at line 104 of file dx_winstuff.hxx.

template<typename T>
dxcanvas::COMReference< T >::~COMReference ( )
inline

Definition at line 123 of file dx_winstuff.hxx.

Member Function Documentation

template<typename T>
T* dxcanvas::COMReference< T >::get ( ) const
inline

Definition at line 139 of file dx_winstuff.hxx.

template<typename T>
bool dxcanvas::COMReference< T >::is ( ) const
inline

Definition at line 138 of file dx_winstuff.hxx.

template<typename T>
T& dxcanvas::COMReference< T >::operator* ( ) const
inline

Definition at line 141 of file dx_winstuff.hxx.

template<typename T>
T* dxcanvas::COMReference< T >::operator-> ( ) const
inline

Definition at line 140 of file dx_winstuff.hxx.

template<typename T>
COMReference& dxcanvas::COMReference< T >::operator= ( const COMReference< T > &  rRHS)
inline

Definition at line 115 of file dx_winstuff.hxx.

template<typename T>
int dxcanvas::COMReference< T >::reset ( )
inline

Member Data Documentation

template<typename T>
T* dxcanvas::COMReference< T >::mp
private

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