fastdo  0.5.12
winux::SimpleHandle< _HTy > 模板类 参考

简单句柄类,管理各种资源的自动释放,赋值相当于传递管理权。 更多...

#include <smartptr.hpp>

winux::SimpleHandle< _HTy > 的协作图:

类

struct  SimpleHandleData
 

Public 类型

typedef _HTy HType
 

Public 成员函数

 SimpleHandle ()
 
 SimpleHandle (_HTy h, _HTy failVal)
 
template<typename _Dt >
 SimpleHandle (_HTy h, _HTy failVal, _Dt dt)
 
template<typename _HTy2 >
 SimpleHandle (_HTy2 h, _HTy2 failVal)
 
template<typename _HTy2 , typename _Dt >
 SimpleHandle (_HTy2 h, _HTy2 failVal, _Dt dt)
 
virtual ~SimpleHandle ()
 
 SimpleHandle (SimpleHandle const &other)
 
SimpleHandle & operator= (SimpleHandle const &other)
 
template<typename _HTy2 >
 SimpleHandle (SimpleHandle< _HTy2 > const &other)
 
template<typename _HTy2 >
SimpleHandle & operator= (SimpleHandle< _HTy2 > const &other)
 
void attachNew (_HTy h, _HTy failVal)
 
template<typename _Dt >
void attachNew (_HTy h, _HTy failVal, _Dt dt)
 
template<typename _HTy2 >
void attachNew (_HTy2 h, _HTy2 failVal)
 
template<typename _HTy2 , typename _Dt >
void attachNew (_HTy2 h, _HTy2 failVal, _Dt dt)
 
void attach (SimpleHandleData const &data)
 
template<typename _HTy2 >
void attach (typename SimpleHandle< _HTy2 >::SimpleHandleData const &data)
 
template<typename _HTy2 >
void attach (_HTy2 h, SimpleDeleterContext *ctx)
 
SimpleHandleData detach ()
 
void reset ()
 
_HTy get () const
 
 operator bool () const
 
_HTy operator-> ()
 
_HTy operator-> () const
 

Protected 成员函数

template<typename _HTy2 >
void _reset0 (_HTy2 newH, SimpleDeleterContext *newCtx)
 释放自身资源,管理新资源 更多...
 
template<typename _HTy2 >
void _reset (_HTy2 &otherH, SimpleDeleterContext *&otherCtx)
 释放自身资源,接管另一个simple的资源,另一个simple置零 更多...
 
template<typename _HTy2 >
void _reset (SimpleHandle< _HTy2 > const &other)
 释放自身资源,接管另一个simple的资源,另一个simple置零 更多...
 

Protected 属性

SimpleHandleData _self
 

友元

template<typename _HTy0 >
class SimpleHandle
 

详细描述

template<typename _HTy>
class winux::SimpleHandle< _HTy >

简单句柄类,管理各种资源的自动释放,赋值相当于传递管理权。

如 ptr2 = ptr1; ptr1将管理权传递到ptr2, ptr1失效. 还能指定一个failVal指示资源分配失败后的句柄值,当不等于这个值时才会创建删除器场景释放资源

在文件 smartptr.hpp 第 75 行定义.

成员类型定义说明

template<typename _HTy>
typedef _HTy winux::SimpleHandle< _HTy >::HType

在文件 smartptr.hpp 第 78 行定义.

构造及析构函数说明

template<typename _HTy>
winux::SimpleHandle< _HTy >::SimpleHandle ( )
inline

在文件 smartptr.hpp 第 88 行定义.

template<typename _HTy>
winux::SimpleHandle< _HTy >::SimpleHandle ( _HTy  h,
_HTy  failVal 
)
inline

在文件 smartptr.hpp 第 90 行定义.

template<typename _HTy>
template<typename _Dt >
winux::SimpleHandle< _HTy >::SimpleHandle ( _HTy  h,
_HTy  failVal,
_Dt  dt 
)
inline

在文件 smartptr.hpp 第 93 行定义.

template<typename _HTy>
template<typename _HTy2 >
winux::SimpleHandle< _HTy >::SimpleHandle ( _HTy2  h,
_HTy2  failVal 
)
inline

在文件 smartptr.hpp 第 96 行定义.

template<typename _HTy>
template<typename _HTy2 , typename _Dt >
winux::SimpleHandle< _HTy >::SimpleHandle ( _HTy2  h,
_HTy2  failVal,
_Dt  dt 
)
inline

在文件 smartptr.hpp 第 99 行定义.

template<typename _HTy>
virtual winux::SimpleHandle< _HTy >::~SimpleHandle ( )
inlinevirtual

在文件 smartptr.hpp 第 101 行定义.

template<typename _HTy>
winux::SimpleHandle< _HTy >::SimpleHandle ( SimpleHandle< _HTy > const &  other)
inline

在文件 smartptr.hpp 第 106 行定义.

template<typename _HTy>
template<typename _HTy2 >
winux::SimpleHandle< _HTy >::SimpleHandle ( SimpleHandle< _HTy2 > const &  other)
inline

在文件 smartptr.hpp 第 118 行定义.

成员函数说明

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::_reset ( _HTy2 &  otherH,
SimpleDeleterContext *&  otherCtx 
)
inlineprotected

释放自身资源,接管另一个simple的资源,另一个simple置零

在文件 smartptr.hpp 第 209 行定义.

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::_reset ( SimpleHandle< _HTy2 > const &  other)
inlineprotected

释放自身资源,接管另一个simple的资源,另一个simple置零

在文件 smartptr.hpp 第 218 行定义.

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::_reset0 ( _HTy2  newH,
SimpleDeleterContext *  newCtx 
)
inlineprotected

释放自身资源,管理新资源

在文件 smartptr.hpp 第 199 行定义.

template<typename _HTy>
void winux::SimpleHandle< _HTy >::attach ( SimpleHandleData const &  data)
inline

在文件 smartptr.hpp 第 152 行定义.

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::attach ( typename SimpleHandle< _HTy2 >::SimpleHandleData const &  data)
inline

在文件 smartptr.hpp 第 158 行定义.

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::attach ( _HTy2  h,
SimpleDeleterContext *  ctx 
)
inline

在文件 smartptr.hpp 第 164 行定义.

template<typename _HTy>
void winux::SimpleHandle< _HTy >::attachNew ( _HTy  h,
_HTy  failVal 
)
inline

在文件 smartptr.hpp 第 130 行定义.

template<typename _HTy>
template<typename _Dt >
void winux::SimpleHandle< _HTy >::attachNew ( _HTy  h,
_HTy  failVal,
_Dt  dt 
)
inline

在文件 smartptr.hpp 第 136 行定义.

template<typename _HTy>
template<typename _HTy2 >
void winux::SimpleHandle< _HTy >::attachNew ( _HTy2  h,
_HTy2  failVal 
)
inline

在文件 smartptr.hpp 第 142 行定义.

template<typename _HTy>
template<typename _HTy2 , typename _Dt >
void winux::SimpleHandle< _HTy >::attachNew ( _HTy2  h,
_HTy2  failVal,
_Dt  dt 
)
inline

在文件 smartptr.hpp 第 147 行定义.

template<typename _HTy>
SimpleHandleData winux::SimpleHandle< _HTy >::detach ( )
inline

在文件 smartptr.hpp 第 169 行定义.

template<typename _HTy>
_HTy winux::SimpleHandle< _HTy >::get ( ) const
inline

在文件 smartptr.hpp 第 182 行定义.

template<typename _HTy>
winux::SimpleHandle< _HTy >::operator bool ( ) const
inline

在文件 smartptr.hpp 第 184 行定义.

template<typename _HTy>
_HTy winux::SimpleHandle< _HTy >::operator-> ( )
inline

在文件 smartptr.hpp 第 186 行定义.

template<typename _HTy>
_HTy winux::SimpleHandle< _HTy >::operator-> ( ) const
inline

在文件 smartptr.hpp 第 191 行定义.

template<typename _HTy>
SimpleHandle& winux::SimpleHandle< _HTy >::operator= ( SimpleHandle< _HTy > const &  other)
inline

在文件 smartptr.hpp 第 111 行定义.

template<typename _HTy>
template<typename _HTy2 >
SimpleHandle& winux::SimpleHandle< _HTy >::operator= ( SimpleHandle< _HTy2 > const &  other)
inline

在文件 smartptr.hpp 第 124 行定义.

template<typename _HTy>
void winux::SimpleHandle< _HTy >::reset ( )
inline

在文件 smartptr.hpp 第 177 行定义.

友元及相关函数文档

template<typename _HTy>
template<typename _HTy0 >
friend class SimpleHandle
friend

在文件 smartptr.hpp 第 227 行定义.

类成员变量说明

template<typename _HTy>
SimpleHandleData winux::SimpleHandle< _HTy >::_self
protected

在文件 smartptr.hpp 第 224 行定义.


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