NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nstd::_shared_ptr< T > 模板类 参考

#include <ne_stl_smart_ptr.h>

Public 类型

using element_type = std::remove_extent_t< T >
 

Public 成员函数

 _shared_ptr ()
 
 _shared_ptr (T *data)
 
 _shared_ptr (std::nullptr_t)
 
 _shared_ptr (const _shared_ptr &sp)
 
template<class D >
 _shared_ptr (const _shared_ptr< D > &sp)
 
 _shared_ptr (const _weak_ptr< T > &wp)
 
 ~_shared_ptr ()
 
_shared_ptroperator= (const _shared_ptr &sp)
 
_shared_ptroperator= (std::nullptr_t)
 
 operator bool () const
 
bool operator== (std::nullptr_t) const
 
bool operator!= (std::nullptr_t) const
 
T * get () const
 
T * operator-> () const
 
T & operator* () const
 
void reset ()
 
void reset (T *data)
 

Private 成员函数

void dec_shared_count ()
 

Private 属性

T * data_ {nullptr}
 
nstd::cblock * cblock_ {nullptr}
 
void(* release_ )(T *&pdata)
 
void(* release_block_ )(nstd::cblock *&pdata)
 

友元

template<class TObj >
class _weak_ptr
 
template<class TObj >
class _shared_ptr
 

成员类型定义说明

◆ element_type

template<class T >
using nstd::_shared_ptr< T >::element_type = std::remove_extent_t<T>

构造及析构函数说明

◆ _shared_ptr() [1/6]

template<class T >
nstd::_shared_ptr< T >::_shared_ptr ( )
inline

◆ _shared_ptr() [2/6]

template<class T >
nstd::_shared_ptr< T >::_shared_ptr ( T *  data)
inlineexplicit

◆ _shared_ptr() [3/6]

template<class T >
nstd::_shared_ptr< T >::_shared_ptr ( std::nullptr_t  )
inline

◆ _shared_ptr() [4/6]

template<class T >
nstd::_shared_ptr< T >::_shared_ptr ( const _shared_ptr< T > &  sp)
inline

◆ _shared_ptr() [5/6]

template<class T >
template<class D >
nstd::_shared_ptr< T >::_shared_ptr ( const _shared_ptr< D > &  sp)
inline

◆ _shared_ptr() [6/6]

template<class T >
nstd::_shared_ptr< T >::_shared_ptr ( const _weak_ptr< T > &  wp)
inline

◆ ~_shared_ptr()

template<class T >
nstd::_shared_ptr< T >::~_shared_ptr ( )
inline

成员函数说明

◆ dec_shared_count()

template<class T >
void nstd::_shared_ptr< T >::dec_shared_count ( )
inlineprivate

◆ get()

template<class T >
T * nstd::_shared_ptr< T >::get ( ) const
inline

◆ operator bool()

template<class T >
nstd::_shared_ptr< T >::operator bool ( ) const
inline

◆ operator!=()

template<class T >
bool nstd::_shared_ptr< T >::operator!= ( std::nullptr_t  ) const
inline

◆ operator*()

template<class T >
T & nstd::_shared_ptr< T >::operator* ( ) const
inline

◆ operator->()

template<class T >
T * nstd::_shared_ptr< T >::operator-> ( ) const
inline

◆ operator=() [1/2]

template<class T >
_shared_ptr & nstd::_shared_ptr< T >::operator= ( const _shared_ptr< T > &  sp)
inline

◆ operator=() [2/2]

template<class T >
_shared_ptr & nstd::_shared_ptr< T >::operator= ( std::nullptr_t  )
inline

◆ operator==()

template<class T >
bool nstd::_shared_ptr< T >::operator== ( std::nullptr_t  ) const
inline

◆ reset() [1/2]

template<class T >
void nstd::_shared_ptr< T >::reset ( )
inline

◆ reset() [2/2]

template<class T >
void nstd::_shared_ptr< T >::reset ( T *  data)
inline

友元及相关函数文档

◆ _shared_ptr

template<class T >
template<class TObj >
friend class _shared_ptr
friend

◆ _weak_ptr

template<class T >
template<class TObj >
friend class _weak_ptr
friend

类成员变量说明

◆ cblock_

template<class T >
nstd::cblock* nstd::_shared_ptr< T >::cblock_ {nullptr}
private

◆ data_

template<class T >
T* nstd::_shared_ptr< T >::data_ {nullptr}
private

◆ release_

template<class T >
void(* nstd::_shared_ptr< T >::release_) (T *&pdata)
inlineprivate

◆ release_block_

template<class T >
void(* nstd::_shared_ptr< T >::release_block_) (nstd::cblock *&pdata)
inlineprivate

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