pacemaker 1.0.1
COM automation for people with deadlines and a hatred of GUIs
 
Loading...
Searching...
No Matches
pacemaker::inca::detail Namespace Reference

Classes

struct  ComObjDeleter
 Custom deleter for COM objects. More...
 
class  COMProxy
 Non-copyable CRTP base class for COM dispatch proxy objects. More...
 

Typedefs

template<class T >
using unique_com_ptr = std::unique_ptr<T, ComObjDeleter<T>>
 RAII owning pointer for COM objects.
 

Typedef Documentation

◆ unique_com_ptr

template<class T >
using unique_com_ptr = std::unique_ptr<T, ComObjDeleter<T>>

RAII owning pointer for COM objects.

An alias for std::unique_ptr<T, ComObjDeleter<T>> that automatically calls T::Release() when the pointer goes out of scope. Ownership semantics are identical to std::unique_ptr: the type is move-only and non-copyable, ensuring that a COM object's reference count is never accidentally incremented by a copy

Typical usage

// rawPtr->Release() is called when p is destroyed.
std::unique_ptr< T, ComObjDeleter< T > > unique_com_ptr
RAII owning pointer for COM objects.
Template Parameters
TA COM interface type that exposes a Release() method.
See also
ComObjDeleter

Definition at line 55 of file unique_com_ptr.hpp.