slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
Slang::ComPtr< T > 模板类 参考

#include <slang-com-ptr.h>

类 Slang::ComPtr< T > 继承关系图:
Inheritance graph
[图例]

Public 类型

typedef T Type
 
typedef ComPtr ThisType
 
typedef ISlangUnknownPtr
 

Public 成员函数

SLANG_FORCE_INLINE ComPtr ()
 
SLANG_FORCE_INLINE ComPtr (std::nullptr_t)
 
SLANG_FORCE_INLINE ComPtr (T *ptr)
 Sets, and ref counts.
 
SLANG_FORCE_INLINE ComPtr (const ThisType &rhs)
 The copy ctor
 
SLANG_FORCE_INLINE ComPtr (InitAttach, T *ptr)
 Ctor without adding to ref count.
 
SLANG_FORCE_INLINE ComPtr (InitAttach, const ThisType &rhs)
 Ctor without adding to ref count
 
SLANG_FORCE_INLINE ~ComPtr ()
 Destructor releases the pointer, assuming it is set
 
SLANG_FORCE_INLINE operator T* () const
 Returns the dumb pointer
 
SLANG_FORCE_INLINE T & operator* ()
 
SLANG_FORCE_INLINE T * operator-> () const
 For making method invocations through the smart pointer work through the dumb pointer
 
SLANG_FORCE_INLINE const ThisTypeoperator= (const ThisType &rhs)
 Assign
 
SLANG_FORCE_INLINE T * operator= (T *in)
 Assign from dumb ptr
 
SLANG_FORCE_INLINE T * get () const
 Get the pointer and don't ref
 
SLANG_FORCE_INLINE void setNull ()
 Release a contained nullptr pointer if set
 
SLANG_FORCE_INLINE T * detach ()
 Detach
 
SLANG_FORCE_INLINE void attach (T *in)
 Set to a pointer without changing the ref count
 
SLANG_FORCE_INLINE T ** writeRef ()
 Get ready for writing (nulls contents)
 
SLANG_FORCE_INLINE T *const * readRef () const
 Get for read access
 
void swap (ThisType &rhs)
 Swap
 

Protected 成员函数

SLANG_FORCE_INLINE T ** operator& ()=delete
 Gets the address of the dumb pointer.
 

Protected 属性

T * m_ptr
 

成员类型定义说明

◆ Ptr

template<class T >
typedef ISlangUnknown* Slang::ComPtr< T >::Ptr

◆ ThisType

template<class T >
typedef ComPtr Slang::ComPtr< T >::ThisType

◆ Type

template<class T >
typedef T Slang::ComPtr< T >::Type

构造及析构函数说明

◆ ComPtr() [1/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( )
inline

Constructors Default Ctor. Sets to nullptr

◆ ComPtr() [2/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( std::nullptr_t )
inline

◆ ComPtr() [3/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( T * ptr)
inlineexplicit

Sets, and ref counts.

◆ ComPtr() [4/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( const ThisType & rhs)
inline

The copy ctor

◆ ComPtr() [5/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( InitAttach ,
T * ptr )
inlineexplicit

Ctor without adding to ref count.

◆ ComPtr() [6/6]

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::ComPtr ( InitAttach ,
const ThisType & rhs )
inline

Ctor without adding to ref count

◆ ~ComPtr()

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::~ComPtr ( )
inline

Destructor releases the pointer, assuming it is set

成员函数说明

◆ attach()

template<class T >
SLANG_FORCE_INLINE void Slang::ComPtr< T >::attach ( T * in)
inline

Set to a pointer without changing the ref count

◆ detach()

template<class T >
SLANG_FORCE_INLINE T * Slang::ComPtr< T >::detach ( )
inline

Detach

◆ get()

template<class T >
SLANG_FORCE_INLINE T * Slang::ComPtr< T >::get ( ) const
inline

Get the pointer and don't ref

◆ operator T*()

template<class T >
SLANG_FORCE_INLINE Slang::ComPtr< T >::operator T* ( ) const
inline

Returns the dumb pointer

◆ operator&()

template<class T >
SLANG_FORCE_INLINE T ** Slang::ComPtr< T >::operator& ( )
protecteddelete

Gets the address of the dumb pointer.

◆ operator*()

template<class T >
SLANG_FORCE_INLINE T & Slang::ComPtr< T >::operator* ( )
inline

◆ operator->()

template<class T >
SLANG_FORCE_INLINE T * Slang::ComPtr< T >::operator-> ( ) const
inline

For making method invocations through the smart pointer work through the dumb pointer

◆ operator=() [1/2]

template<typename T >
const ComPtr< T > & Slang::ComPtr< T >::operator= ( const ThisType & rhs)

Assign

◆ operator=() [2/2]

template<typename T >
T * Slang::ComPtr< T >::operator= ( T * in)

Assign from dumb ptr

◆ readRef()

template<class T >
SLANG_FORCE_INLINE T *const * Slang::ComPtr< T >::readRef ( ) const
inline

Get for read access

◆ setNull()

template<typename T >
void Slang::ComPtr< T >::setNull ( )

Release a contained nullptr pointer if set

这是这个函数的调用关系图:

◆ swap()

template<typename T >
void Slang::ComPtr< T >::swap ( ThisType & rhs)

Swap

◆ writeRef()

template<class T >
SLANG_FORCE_INLINE T ** Slang::ComPtr< T >::writeRef ( )
inline

Get ready for writing (nulls contents)

函数调用图:
这是这个函数的调用关系图:

类成员变量说明

◆ m_ptr

template<class T >
T* Slang::ComPtr< T >::m_ptr
protected

该类的文档由以下文件生成: