lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
COM pointer class that performs reference counting on COM objects of the given type. More...
#include <com_ptr.h>
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_type * | unbind () |
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_ptr & | operator= (com_type *object) |
Replaces the stored COM object with the given object. [ESA] | |
com_ptr & | operator= (const com_ptr &right) |
Replaces the stored COM object with one stored by the given COM pointer. [ESA] | |
template<class COMType2 , bool Critical2> | |
com_ptr & | operator= (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_type & | operator* () const |
Gets the COM object stored by this COM pointer. | |
LEAN_INLINE com_type * | operator-> () 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. |
COM pointer class that performs reference counting on COM objects of the given type.
enum lean::smart::com_ptr::bind_reference_t |