YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::GLocalStaticCache< _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 成员函数

 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.hpp150 行定义.

成员类型定义说明

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

在文件 ystorage.hpp153 行定义.

构造及析构函数说明

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.hpp179 行定义.

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

取实例引用。

在文件 ystorage.hpp202 行定义.

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

取指针。

在文件 ystorage.hpp193 行定义.

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

在文件 ystorage.hpp188 行定义.

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

取静态指针引用。

自从
build 319

在文件 ystorage.hpp168 行定义.

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

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

自从
build 319

在文件 ystorage.hpp213 行定义.

类成员变量说明

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

在文件 ystorage.hpp159 行定义.


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