YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler > 模板结构体 参考abstract

注册处理器抽象模板:供派生类加载一个或多个键和指定类型关联的例程。 更多...

#include <yfunc.hpp>

YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler > 的协作图:

Public 成员函数

 PDefH (bool, Contains, const _tKey &key) const ImplRet(registered_map.count(key)!=0) DeclSEntry(template< _type
 
_fHandler _fHandler GetRegister () const ) template< typename..._tParams > auto Call(const _tKey &key
 
template<class _type >
void Register (const _tKey &key)
 
template<typename _tIn , class _type , class _tTuple >
void Register (_tIn first, _tIn last)
 
template<class _type , class... _types>
void Register (std::initializer_list< string > il)
 

Private 成员函数

template<typename _tIn >
void RegisterTail (tuple<> *, _tIn first, _tIn last)
 
template<typename _tIn , class _type , class... _types>
void RegisterTail (tuple< _type, _types...> *, _tIn first, _tIn last)
 

Private 属性

unordered_map< _tKey, _fHandler > registered_map {}
 

详细描述

template<class _tDerived, typename _tKey, typename _fHandler>
struct YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >

注册处理器抽象模板:供派生类加载一个或多个键和指定类型关联的例程。

注解
加载的键的数量和类型的数量需要保持一致。
警告
非虚析构。
自从
build 494

在文件 yfunc.hpp328 行定义.

成员函数说明

template<class _tDerived, typename _tKey, typename _fHandler>
_fHandler _fHandler YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::GetRegister ( ) const
template<class _tDerived, typename _tKey, typename _fHandler>
YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::PDefH ( bool  ,
Contains  ,
const _tKey &  key 
) const
pure virtual
自从
build 495
template<class _tDerived, typename _tKey, typename _fHandler>
template<class _type >
void YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::Register ( const _tKey &  key)
inline
template<class _tDerived, typename _tKey, typename _fHandler>
template<typename _tIn , class _type , class _tTuple >
void YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::Register ( _tIn  first,
_tIn  last 
)
inline

在文件 yfunc.hpp365 行定义.

template<class _tDerived, typename _tKey, typename _fHandler>
template<class _type , class... _types>
void YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::Register ( std::initializer_list< string il)
inline

在文件 yfunc.hpp380 行定义.

template<class _tDerived, typename _tKey, typename _fHandler>
template<typename _tIn >
void YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::RegisterTail ( tuple<> *  ,
_tIn  first,
_tIn  last 
)
inlineprivate

在文件 yfunc.hpp391 行定义.

template<class _tDerived, typename _tKey, typename _fHandler>
template<typename _tIn , class _type , class... _types>
void YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::RegisterTail ( tuple< _type, _types...> *  ,
_tIn  first,
_tIn  last 
)
inlineprivate

在文件 yfunc.hpp399 行定义.

类成员变量说明

template<class _tDerived, typename _tKey, typename _fHandler>
unordered_map<_tKey, _fHandler> YSLib::GHandlerRegisterBase< _tDerived, _tKey, _fHandler >::registered_map {}
private

该结构体的文档由以下文件生成: