92#ifdef SLANG_HAS_MOVE_SEMANTICS
160#ifndef SLANG_COM_PTR_ENABLE_REF_OPERATOR
173 ((
Ptr)m_ptr)->release();
184 ((
Ptr)m_ptr)->release();
193 ((
Ptr)ptr)->addRef();
195 ((
Ptr)m_ptr)->release();
Definition slang-com-ptr.h:50
SLANG_FORCE_INLINE T * get() const
Get the pointer and don't ref
Definition slang-com-ptr.h:131
SLANG_FORCE_INLINE ComPtr(InitAttach, T *ptr)
Ctor without adding to ref count.
Definition slang-com-ptr.h:82
SLANG_FORCE_INLINE const ThisType & operator=(const ThisType &rhs)
Assign
Definition slang-com-ptr.h:179
SLANG_FORCE_INLINE T * detach()
Detach
Definition slang-com-ptr.h:136
SLANG_FORCE_INLINE ComPtr(InitAttach, const ThisType &rhs)
Ctor without adding to ref count
Definition slang-com-ptr.h:87
T * m_ptr
Definition slang-com-ptr.h:164
void swap(ThisType &rhs)
Swap
Definition slang-com-ptr.h:201
SLANG_FORCE_INLINE ComPtr(std::nullptr_t)
Definition slang-com-ptr.h:62
SLANG_FORCE_INLINE T ** writeRef()
Get ready for writing (nulls contents)
Definition slang-com-ptr.h:146
SLANG_FORCE_INLINE void attach(T *in)
Set to a pointer without changing the ref count
Definition slang-com-ptr.h:143
SLANG_FORCE_INLINE void setNull()
Release a contained nullptr pointer if set
Definition slang-com-ptr.h:169
ComPtr ThisType
Definition slang-com-ptr.h:53
SLANG_FORCE_INLINE T * operator->() const
For making method invocations through the smart pointer work through the dumb pointer
Definition slang-com-ptr.h:123
SLANG_FORCE_INLINE T * operator=(T *in)
Assign from dumb ptr
Definition slang-com-ptr.h:190
SLANG_FORCE_INLINE T ** operator&()=delete
Gets the address of the dumb pointer.
ISlangUnknown * Ptr
Definition slang-com-ptr.h:54
SLANG_FORCE_INLINE ComPtr(T *ptr)
Sets, and ref counts.
Definition slang-com-ptr.h:67
SLANG_FORCE_INLINE ComPtr(const ThisType &rhs)
The copy ctor
Definition slang-com-ptr.h:74
SLANG_FORCE_INLINE T & operator*()
Definition slang-com-ptr.h:121
SLANG_FORCE_INLINE ~ComPtr()
Destructor releases the pointer, assuming it is set
Definition slang-com-ptr.h:110
SLANG_FORCE_INLINE T *const * readRef() const
Get for read access
Definition slang-com-ptr.h:152
T Type
Definition slang-com-ptr.h:52
SLANG_FORCE_INLINE ComPtr()
Definition slang-com-ptr.h:58
Definition slang-com-ptr.h:10
InitAttach
ComPtr is a simple smart pointer that manages types which implement COM based interfaces.
Definition slang-com-ptr.h:44
@ INIT_ATTACH
Definition slang-com-ptr.h:45
#define SLANG_FORCE_INLINE
Definition slang-cpp-prelude.h:286
Definition slang-cpp-prelude.h:303