CommonLibVR
REX::W32::ComPtr< T > Struct Template Reference

#include <COMPTR.h>

Public Member Functions

constexpr ComPtr () noexcept=default
 
constexpr ComPtr (std::nullptr_t) noexcept
 
 ComPtr (const ComPtr &a_other) noexcept
 
template<class U >
 ComPtr (U *a_other) noexcept
 
 ~ComPtr () noexcept
 
ComPtroperator= (std::nullptr_t) noexcept
 
ComPtroperator= (T *a_other) noexcept
 
template<class U >
ComPtroperator= (U *a_other) noexcept
 
ComPtroperator= (const ComPtr &a_other) noexcept
 
template<class U >
ComPtroperator= (const ComPtr< U > &a_other) noexcept
 
ComPtroperator= (ComPtr &&a_other) noexcept
 
template<class U >
ComPtroperator= (ComPtr< U > &&a_other) noexcept
 
T * operator-> () const noexcept
 
void Attach (T *a_other) noexcept
 
T * Detach () noexcept
 
T * Get () const noexcept
 
T ** GetAddressOf () noexcept
 
T *const * GetAddressOf () const noexcept
 
T ** ReleaseAndGetAddressOf () noexcept
 
std::uint32_t Reset () noexcept
 
void Swap (ComPtr &a_other) noexcept
 
void Swap (ComPtr &&a_other) noexcept
 
template<class U >
HRESULT As (ComPtr< U > *a_ptr) const noexcept
 
template<class U >
HRESULT AsIID (const IID &a_iid, ComPtr< U > *a_ptr) const noexcept
 
HRESULT CopyTo (const IID &a_iid, void **a_ptr) const noexcept
 
HRESULT CopyTo (T **a_ptr) const noexcept
 
template<class U >
HRESULT CopyTo (U **a_ptr) const noexcept
 

Protected Member Functions

void TryAddRef () const noexcept
 
std::uint32_t TryRelease () noexcept
 

Protected Attributes

T * _ptr { nullptr }
 

Friends

template<class U >
struct ComPtr
 

Constructor & Destructor Documentation

◆ ComPtr() [1/4]

template<class T >
constexpr REX::W32::ComPtr< T >::ComPtr ( )
constexprdefaultnoexcept

◆ ComPtr() [2/4]

template<class T >
constexpr REX::W32::ComPtr< T >::ComPtr ( std::nullptr_t  )
inlineconstexprnoexcept

◆ ComPtr() [3/4]

template<class T >
REX::W32::ComPtr< T >::ComPtr ( const ComPtr< T > &  a_other)
inlinenoexcept

◆ ComPtr() [4/4]

template<class T >
template<class U >
REX::W32::ComPtr< T >::ComPtr ( U *  a_other)
inlinenoexcept

◆ ~ComPtr()

template<class T >
REX::W32::ComPtr< T >::~ComPtr ( )
inlinenoexcept

Member Function Documentation

◆ As()

template<class T >
template<class U >
HRESULT REX::W32::ComPtr< T >::As ( ComPtr< U > *  a_ptr) const
inlinenoexcept

◆ AsIID()

template<class T >
template<class U >
HRESULT REX::W32::ComPtr< T >::AsIID ( const IID a_iid,
ComPtr< U > *  a_ptr 
) const
inlinenoexcept

◆ Attach()

template<class T >
void REX::W32::ComPtr< T >::Attach ( T *  a_other)
inlinenoexcept

◆ CopyTo() [1/3]

template<class T >
HRESULT REX::W32::ComPtr< T >::CopyTo ( const IID a_iid,
void **  a_ptr 
) const
inlinenoexcept

◆ CopyTo() [2/3]

template<class T >
HRESULT REX::W32::ComPtr< T >::CopyTo ( T **  a_ptr) const
inlinenoexcept

◆ CopyTo() [3/3]

template<class T >
template<class U >
HRESULT REX::W32::ComPtr< T >::CopyTo ( U **  a_ptr) const
inlinenoexcept

◆ Detach()

template<class T >
T* REX::W32::ComPtr< T >::Detach ( )
inlinenoexcept

◆ Get()

template<class T >
T* REX::W32::ComPtr< T >::Get ( ) const
inlinenoexcept

◆ GetAddressOf() [1/2]

template<class T >
T* const* REX::W32::ComPtr< T >::GetAddressOf ( ) const
inlinenoexcept

◆ GetAddressOf() [2/2]

template<class T >
T** REX::W32::ComPtr< T >::GetAddressOf ( )
inlinenoexcept

◆ operator->()

template<class T >
T* REX::W32::ComPtr< T >::operator-> ( ) const
inlinenoexcept

◆ operator=() [1/7]

template<class T >
ComPtr& REX::W32::ComPtr< T >::operator= ( ComPtr< T > &&  a_other)
inlinenoexcept

◆ operator=() [2/7]

template<class T >
template<class U >
ComPtr& REX::W32::ComPtr< T >::operator= ( ComPtr< U > &&  a_other)
inlinenoexcept

◆ operator=() [3/7]

template<class T >
ComPtr& REX::W32::ComPtr< T >::operator= ( const ComPtr< T > &  a_other)
inlinenoexcept

◆ operator=() [4/7]

template<class T >
template<class U >
ComPtr& REX::W32::ComPtr< T >::operator= ( const ComPtr< U > &  a_other)
inlinenoexcept

◆ operator=() [5/7]

template<class T >
ComPtr& REX::W32::ComPtr< T >::operator= ( std::nullptr_t  )
inlinenoexcept

◆ operator=() [6/7]

template<class T >
ComPtr& REX::W32::ComPtr< T >::operator= ( T *  a_other)
inlinenoexcept

◆ operator=() [7/7]

template<class T >
template<class U >
ComPtr& REX::W32::ComPtr< T >::operator= ( U *  a_other)
inlinenoexcept

◆ ReleaseAndGetAddressOf()

template<class T >
T** REX::W32::ComPtr< T >::ReleaseAndGetAddressOf ( )
inlinenoexcept

◆ Reset()

template<class T >
std::uint32_t REX::W32::ComPtr< T >::Reset ( )
inlinenoexcept

◆ Swap() [1/2]

template<class T >
void REX::W32::ComPtr< T >::Swap ( ComPtr< T > &&  a_other)
inlinenoexcept

◆ Swap() [2/2]

template<class T >
void REX::W32::ComPtr< T >::Swap ( ComPtr< T > &  a_other)
inlinenoexcept

◆ TryAddRef()

template<class T >
void REX::W32::ComPtr< T >::TryAddRef ( ) const
inlineprotectednoexcept

◆ TryRelease()

template<class T >
std::uint32_t REX::W32::ComPtr< T >::TryRelease ( )
inlineprotectednoexcept

Friends And Related Function Documentation

◆ ComPtr

template<class T >
template<class U >
friend struct ComPtr
friend

Member Data Documentation

◆ _ptr

template<class T >
T* REX::W32::ComPtr< T >::_ptr { nullptr }
protected

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