fastdo  0.5.12
winux::SimplePointer< _Ty > 模板类 参考

简单指针 更多...

#include <smartptr.hpp>

类 winux::SimplePointer< _Ty > 继承关系图:
winux::SimplePointer< _Ty > 的协作图:

Public 类型

typedef SimpleHandle< _Ty * > MyBase
 
typedef _Ty Type
 
- Public 类型 继承自 winux::SimpleHandle< _Ty * >
typedef _Ty * HType
 

Public 成员函数

 SimplePointer ()
 
 SimplePointer (_Ty *p)
 
template<typename _Dt >
 SimplePointer (_Ty *p, _Dt dt)
 
template<typename _Ty2 >
 SimplePointer (_Ty2 *p)
 
template<typename _Ty2 , typename _Dt >
 SimplePointer (_Ty2 *p, _Dt dt)
 
 SimplePointer (SimplePointer const &other)
 
SimplePointeroperator= (SimplePointer const &other)
 
template<typename _Ty2 >
 SimplePointer (SimplePointer< _Ty2 > const &other)
 
template<typename _Ty2 >
SimplePointeroperator= (SimplePointer< _Ty2 > const &other)
 
void attachNew (_Ty *p)
 
template<typename _Dt >
void attachNew (_Ty *p, _Dt dt)
 
template<typename _Ty2 >
void attachNew (_Ty2 *p)
 
template<typename _Ty2 , typename _Dt >
void attachNew (_Ty2 *p, _Dt dt)
 
template<typename _Ty2 >
SimplePointer< _Ty2 > cast ()
 把指针由_Ty转换成_Ty2类型 更多...
 
template<typename _Ty2 >
SimplePointer< _Ty2 > ensureCast ()
 把指针由_Ty转换成_Ty2类型 更多...
 
- Public 成员函数 继承自 winux::SimpleHandle< _Ty * >
 SimpleHandle ()
 
 SimpleHandle (_Ty * h, _Ty * failVal)
 
 SimpleHandle (_Ty * h, _Ty * failVal, _Dt dt)
 
 SimpleHandle (_HTy2 h, _HTy2 failVal)
 
 SimpleHandle (_HTy2 h, _HTy2 failVal, _Dt dt)
 
 SimpleHandle (SimpleHandle const &other)
 
 SimpleHandle (SimpleHandle< _HTy2 > const &other)
 
virtual ~SimpleHandle ()
 
SimpleHandleoperator= (SimpleHandle const &other)
 
SimpleHandleoperator= (SimpleHandle< _HTy2 > const &other)
 
void attachNew (_Ty * h, _Ty * failVal)
 
void attachNew (_Ty * h, _Ty * failVal, _Dt dt)
 
void attachNew (_HTy2 h, _HTy2 failVal)
 
void attachNew (_HTy2 h, _HTy2 failVal, _Dt dt)
 
void attach (SimpleHandleData const &data)
 
void attach (typename SimpleHandle< _HTy2 >::SimpleHandleData const &data)
 
void attach (_HTy2 h, SimpleDeleterContext *ctx)
 
SimpleHandleData detach ()
 
void reset ()
 
_Ty * get () const
 
 operator bool () const
 
_Ty * operator-> ()
 
_Ty * operator-> () const
 

友元

template<typename _Ty0 >
class SimplePointer
 

额外继承的成员函数

- Protected 成员函数 继承自 winux::SimpleHandle< _Ty * >
void _reset0 (_HTy2 newH, SimpleDeleterContext *newCtx)
 释放自身资源,管理新资源 更多...
 
void _reset (_HTy2 &otherH, SimpleDeleterContext *&otherCtx)
 释放自身资源,接管另一个simple的资源,另一个simple置零 更多...
 
void _reset (SimpleHandle< _HTy2 > const &other)
 释放自身资源,接管另一个simple的资源,另一个simple置零 更多...
 
- Protected 属性 继承自 winux::SimpleHandle< _Ty * >
SimpleHandleData _self
 

详细描述

template<typename _Ty>
class winux::SimplePointer< _Ty >

简单指针

在文件 smartptr.hpp232 行定义.

成员类型定义说明

template<typename _Ty>
typedef SimpleHandle<_Ty*> winux::SimplePointer< _Ty >::MyBase

在文件 smartptr.hpp235 行定义.

template<typename _Ty>
typedef _Ty winux::SimplePointer< _Ty >::Type

在文件 smartptr.hpp236 行定义.

构造及析构函数说明

template<typename _Ty>
winux::SimplePointer< _Ty >::SimplePointer ( )
inline

在文件 smartptr.hpp238 行定义.

template<typename _Ty>
winux::SimplePointer< _Ty >::SimplePointer ( _Ty *  p)
inlineexplicit

在文件 smartptr.hpp240 行定义.

template<typename _Ty>
template<typename _Dt >
winux::SimplePointer< _Ty >::SimplePointer ( _Ty *  p,
_Dt  dt 
)
inline

在文件 smartptr.hpp243 行定义.

template<typename _Ty>
template<typename _Ty2 >
winux::SimplePointer< _Ty >::SimplePointer ( _Ty2 *  p)
inlineexplicit

在文件 smartptr.hpp246 行定义.

template<typename _Ty>
template<typename _Ty2 , typename _Dt >
winux::SimplePointer< _Ty >::SimplePointer ( _Ty2 *  p,
_Dt  dt 
)
inline

在文件 smartptr.hpp249 行定义.

template<typename _Ty>
winux::SimplePointer< _Ty >::SimplePointer ( SimplePointer< _Ty > const &  other)
inline

在文件 smartptr.hpp251 行定义.

template<typename _Ty>
template<typename _Ty2 >
winux::SimplePointer< _Ty >::SimplePointer ( SimplePointer< _Ty2 > const &  other)
inline

在文件 smartptr.hpp263 行定义.

成员函数说明

template<typename _Ty>
void winux::SimplePointer< _Ty >::attachNew ( _Ty *  p)
inline

在文件 smartptr.hpp275 行定义.

template<typename _Ty>
template<typename _Dt >
void winux::SimplePointer< _Ty >::attachNew ( _Ty *  p,
_Dt  dt 
)
inline

在文件 smartptr.hpp281 行定义.

template<typename _Ty>
template<typename _Ty2 >
void winux::SimplePointer< _Ty >::attachNew ( _Ty2 *  p)
inline

在文件 smartptr.hpp287 行定义.

template<typename _Ty>
template<typename _Ty2 , typename _Dt >
void winux::SimplePointer< _Ty >::attachNew ( _Ty2 *  p,
_Dt  dt 
)
inline

在文件 smartptr.hpp293 行定义.

template<typename _Ty>
template<typename _Ty2 >
SimplePointer<_Ty2> winux::SimplePointer< _Ty >::cast ( )
inline

把指针由_Ty转换成_Ty2类型

通常_Ty为基类,_Ty2为派生类,并且_Ty指针所指的是_Ty2类型的对象。 如果转换失败,返回空指针,自身改不变。如果转换成功,自身放弃所有权,置零。

在文件 smartptr.hpp303 行定义.

template<typename _Ty>
template<typename _Ty2 >
SimplePointer<_Ty2> winux::SimplePointer< _Ty >::ensureCast ( )
inline

把指针由_Ty转换成_Ty2类型

通常_Ty为基类,_Ty2为派生类,并且_Ty指针所指的必须是_Ty2类型的对象,才能使用这个函数。 你必须担保转换成功,否则将产生灾难。

在文件 smartptr.hpp321 行定义.

template<typename _Ty>
SimplePointer& winux::SimplePointer< _Ty >::operator= ( SimplePointer< _Ty > const &  other)
inline

在文件 smartptr.hpp256 行定义.

template<typename _Ty>
template<typename _Ty2 >
SimplePointer& winux::SimplePointer< _Ty >::operator= ( SimplePointer< _Ty2 > const &  other)
inline

在文件 smartptr.hpp269 行定义.

友元及相关函数文档

template<typename _Ty>
template<typename _Ty0 >
friend class SimplePointer
friend

在文件 smartptr.hpp332 行定义.


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