YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::GLocalStaticCache< _type, _tPointer > 模板类 参考

全局局部静态单态存储器。 更多...

#include <ystorage.hpp>

Public 类型

using PointerType = _tPointer
 

静态 Public 成员函数

static DefGetter (ynothrow, PointerType, PointerRaw, GetStaticPtrRef()) static PointerType GetPointer()
 取指针。 更多...
 
static _type & GetInstance ()
 取实例引用。 更多...
 
static void Release () ynothrow
 删除对象并置指针为空值。 更多...
 

Private 成员函数

 GLocalStaticCache ()
 

静态 Private 成员函数

static PointerTypeGetStaticPtrRef () ynothrow
 取静态指针引用。 更多...
 
static void Check ()
 检查是否已经初始化,否则构造新对象。 更多...
 

静态 Private 属性

static PointerType _ptr
 

详细描述

template<typename _type, typename _tPointer = _type*>
class YSLib::GLocalStaticCache< _type, _tPointer >

全局局部静态单态存储器。

前置条件
std::is_nothrow_constructible<_tPointer>::value
警告
非线程安全。
自从
build 205

在文件 ystorage.hpp151 行定义.

成员类型定义说明

template<typename _type, typename _tPointer = _type*>
using YSLib::GLocalStaticCache< _type, _tPointer >::PointerType = _tPointer

在文件 ystorage.hpp157 行定义.

构造及析构函数说明

template<typename _type, typename _tPointer = _type*>
YSLib::GLocalStaticCache< _type, _tPointer >::GLocalStaticCache ( )
private

成员函数说明

template<typename _type, typename _tPointer = _type*>
static void YSLib::GLocalStaticCache< _type, _tPointer >::Check ( )
inlinestaticprivate

检查是否已经初始化,否则构造新对象。

在文件 ystorage.hpp180 行定义.

参考 YSLib::GLocalStaticCache< _type, _tPointer >::GetStaticPtrRef().

参考自 YSLib::GLocalStaticCache< _type, _tPointer >::DefGetter() , 以及 YSLib::GLocalStaticCache< _type, _tPointer >::GetInstance().

函数调用图:

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

template<typename _type, typename _tPointer = _type*>
static YSLib::GLocalStaticCache< _type, _tPointer >::DefGetter ( ynothrow  ,
PointerType  ,
PointerRaw  ,
GetStaticPtrRef()   
)
inlinestatic

取指针。

在文件 ystorage.hpp189 行定义.

参考 YSLib::GLocalStaticCache< _type, _tPointer >::Check().

函数调用图:

template<typename _type, typename _tPointer = _type*>
static _type& YSLib::GLocalStaticCache< _type, _tPointer >::GetInstance ( )
inlinestatic

取实例引用。

在文件 ystorage.hpp203 行定义.

参考 YSLib::GLocalStaticCache< _type, _tPointer >::Check().

函数调用图:

template<typename _type, typename _tPointer = _type*>
static PointerType& YSLib::GLocalStaticCache< _type, _tPointer >::GetStaticPtrRef ( )
inlinestaticprivate

取静态指针引用。

自从
build 319

在文件 ystorage.hpp169 行定义.

参考自 YSLib::GLocalStaticCache< _type, _tPointer >::Check() , 以及 YSLib::GLocalStaticCache< _type, _tPointer >::Release().

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

template<typename _type, typename _tPointer = _type*>
static void YSLib::GLocalStaticCache< _type, _tPointer >::Release ( )
inlinestatic

删除对象并置指针为空值。

自从
build 319

在文件 ystorage.hpp214 行定义.

参考 YSLib::GLocalStaticCache< _type, _tPointer >::GetStaticPtrRef().

函数调用图:

类成员变量说明

template<typename _type, typename _tPointer = _type*>
PointerType YSLib::GLocalStaticCache< _type, _tPointer >::_ptr
staticprivate

在文件 ystorage.hpp160 行定义.


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