lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Public Types | Public Member Functions | Static Public Member Functions
lean::smart::com_ptr< COMType, Critical > Class Template Reference

COM pointer class that performs reference counting on COM objects of the given type. More...

#include <com_ptr.h>

List of all members.

Public Types

enum  bind_reference_t { bind_reference }
 Allows for the binding of existing COM object references on COM pointer construction. More...
typedef COMType com_type
 Type of the COM object stored by this COM pointer.
typedef COMType * value_type
 Type of the pointer stored by this COM pointer.

Public Member Functions

 com_ptr (com_type *object=nullptr)
 Constructs a COM pointer from the given COM object.
template<class COMType2 >
 com_ptr (COMType2 *object)
 Constructs a COM pointer from the given COM object.
 com_ptr (COMType *object, bind_reference_t)
 Constructs a COM pointer from the given COM object without incrementing its reference count.
 com_ptr (const com_ptr &right)
 Constructs a COM pointer from the given COM pointer.
template<class COMType2 , bool Critical2>
 com_ptr (const com_ptr< COMType2, Critical2 > &right)
 Constructs a COM pointer from the given COM pointer.
 ~com_ptr () throw ()
 Destroys the COM pointer.
LEAN_INLINE com_typeunbind ()
 Unbinds the COM object reference held by this COM pointer.
LEAN_INLINE com_ptr< com_type,
true > 
transfer ()
 Transfers the COM object reference held by this COM pointer to a new COM pointer.
com_ptroperator= (com_type *object)
 Replaces the stored COM object with the given object. [ESA]
com_ptroperator= (const com_ptr &right)
 Replaces the stored COM object with one stored by the given COM pointer. [ESA]
template<class COMType2 , bool Critical2>
com_ptroperator= (const com_ptr< COMType2, Critical2 > &right)
 Replaces the stored COM object with one stored by the given COM pointer. [ESA]
LEAN_INLINE com_type *const & get (void) const
 Gets the COM object stored by this COM pointer.
LEAN_INLINE com_typeoperator* () const
 Gets the COM object stored by this COM pointer.
LEAN_INLINE com_typeoperator-> () const
 Gets the COM object stored by this COM pointer.
LEAN_INLINE operator com_type * () const
 Gets the COM object stored by this COM pointer.
LEAN_INLINE com_type ** rebind ()
 Gets a double-pointer allowing for COM-style object retrieval. The pointer returned may only ever be used until the next call to one of this COM pointer's methods.

Static Public Member Functions

static LEAN_INLINE com_ptr
< com_type, true > 
bind (com_type *object)
 Binds the given COM object reference to this COM pointer.

Detailed Description

template<class COMType, bool Critical = false>
class lean::smart::com_ptr< COMType, Critical >

COM pointer class that performs reference counting on COM objects of the given type.


Member Enumeration Documentation

template<class COMType, bool Critical = false>
enum lean::smart::com_ptr::bind_reference_t

Allows for the binding of existing COM object references on COM pointer construction.

Enumerator:
bind_reference 

Allows for the binding of existing COM object references on COM pointer construction.


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