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

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

#include <ystorage.hpp>

Public 类型

typedef _tPointer PointerType
 

静态 Public 成员函数

static PointerType GetPointerRaw () ynothrow
 
static PointerType GetPointer ()
 取指针。
 
static _type & GetInstance ()
 取实例引用。
 
static void Release () ynothrow
 删除对象并置指针为空值。
 

Private 成员函数

 GStaticCache ()
 

静态 Private 成员函数

static void Check ()
 检查是否已经初始化,否则构造新对象。
 

静态 Private 属性

static PointerType _ptr
 

详细描述

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

全局静态单态存储器。

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

在文件 ystorage.hpp83 行定义.

成员类型定义说明

template<typename _type , typename _tPointer = _type*>
typedef _tPointer YSLib::GStaticCache< _type, _tPointer >::PointerType

在文件 ystorage.hpp86 行定义.

构造及析构函数说明

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

成员函数说明

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

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

在文件 ystorage.hpp100 行定义.

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

取实例引用。

在文件 ystorage.hpp121 行定义.

template<typename _type , typename _tPointer = _type*>
static PointerType YSLib::GStaticCache< _type, _tPointer >::GetPointer ( )
inlinestatic

取指针。

在文件 ystorage.hpp112 行定义.

template<typename _type , typename _tPointer = _type*>
static PointerType YSLib::GStaticCache< _type, _tPointer >::GetPointerRaw ( )
inlinestatic

在文件 ystorage.hpp107 行定义.

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

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

自从
build 319

在文件 ystorage.hpp132 行定义.

类成员变量说明

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

在文件 ystorage.hpp92 行定义.


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