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)
 
SimpleHandleoperator= (SimpleHandle const &other)
 
template<typename _HTy2 >
 SimpleHandle (SimpleHandle< _HTy2 > const &other)
 
template<typename _HTy2 >
SimpleHandleoperator= (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.hpp75 行定义.

成员类型定义说明

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

在文件 smartptr.hpp78 行定义.

构造及析构函数说明

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

在文件 smartptr.hpp88 行定义.

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

在文件 smartptr.hpp90 行定义.

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

在文件 smartptr.hpp93 行定义.

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

在文件 smartptr.hpp96 行定义.

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

在文件 smartptr.hpp99 行定义.

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

在文件 smartptr.hpp101 行定义.

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

在文件 smartptr.hpp106 行定义.

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

在文件 smartptr.hpp118 行定义.

成员函数说明

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

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

在文件 smartptr.hpp209 行定义.

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

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

在文件 smartptr.hpp218 行定义.

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

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

在文件 smartptr.hpp199 行定义.

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

在文件 smartptr.hpp152 行定义.

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

在文件 smartptr.hpp158 行定义.

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

在文件 smartptr.hpp164 行定义.

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

在文件 smartptr.hpp130 行定义.

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

在文件 smartptr.hpp136 行定义.

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

在文件 smartptr.hpp142 行定义.

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

在文件 smartptr.hpp147 行定义.

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

在文件 smartptr.hpp169 行定义.

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

在文件 smartptr.hpp182 行定义.

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

在文件 smartptr.hpp184 行定义.

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

在文件 smartptr.hpp186 行定义.

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

在文件 smartptr.hpp191 行定义.

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

在文件 smartptr.hpp111 行定义.

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

在文件 smartptr.hpp124 行定义.

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

在文件 smartptr.hpp177 行定义.

友元及相关函数文档

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

在文件 smartptr.hpp227 行定义.

类成员变量说明

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

在文件 smartptr.hpp224 行定义.


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