YSTest: YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc > 模板类 参考

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Public 类型 | Public 成员函数 | Public 属性 | Private 类型 | 所有成员列表
YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc > 模板类 参考

在复制初始化时传播分配器的多态值持有者。 更多...

`#include <YObject.h>`

类 YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc > 继承关系图:
[图例]
YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc > 的协作图:
[图例]

## Public 类型

using | Creation = IValueHolder::Creation
using | value_type = _type
Public 类型 继承自 YSLib::AllocatorHolder< _tTarget, _tByteAlloc >
using | Creation = IValueHolder::Creation
using | value_type = _tTarget
Public 类型 继承自 YSLib::ValueHolder< _tTarget >
using | value_type = _tTarget

## Public 成员函数

template<typename... _tParams, yimpl(typename=ystdex::exclude_self_params_t< PolymorphicAllocatorHolder, _tParams... >, typename=ystdex::enable_if_t< std::is_constructible< base, _tParams &&... >::value >) >
| PolymorphicAllocatorHolder (_tParams &&... args)
| DefDeCopyMoveCtorAssignment (PolymorphicAllocatorHolder) YB_ATTR_nodiscard PDefH(any
Creation const any &x const | ImplI (IValueHolder) ImplRet(AllocatedHolderOperations< PolymorphicAllocatorHolder
Creation const any &x const _tByteAlloc | CreateHolder (c, x, value, YSLib::forward_as_tuple(ystdex::as_const(value)), YSLib::forward_as_tuple(std::move(value)))) YB_ATTR_nodiscard YB_PURE PDefH(bool
Public 成员函数 继承自 YSLib::AllocatorHolder< _tTarget, _tByteAlloc >
| AllocatorHolder (_tParams &&... args)
| DefDeCopyMoveCtorAssignment (AllocatorHolder) YB_ATTR_nodiscard any Create(Creation c
const any &x const | ImplI (IValueHolder)
YB_ATTR_nodiscard YB_PURE auto | get_allocator () const ynothrow -> decltype(std::declval< const _tObj & >().get_allocator())
Public 成员函数 继承自 YSLib::ValueHolder< _tTarget >
| DefDeCtor (ValueHolder) template< typename _tParam
| yimpl (typename=ystdex::exclude_self_t< ValueHolder, _tParam >, typename=ystdex::enable_if_t< std::is_constructible< _tTarget, _tParam >::value >)> inline ValueHolder(_tParam &&arg) ynoexcept(std
| DefDeCopyMoveCtorAssignment (ValueHolder) YB_ATTR_nodiscard PDefH(any
Creation const any &const | ImplI (IValueHolder) ImplRet(CreateHolder(c
Creation const any &const this value YB_ATTR_nodiscard YB_PURE | PDefH (bool, Equals, const void *p) const ImplI(IValueHolder) ImplRet(bool(p) &&AreEqualHeld(this -> value, Deref(static_cast< const value_type * >(p)))) YB_ATTR_nodiscard YB_PURE PDefH(size_t, OwnsCount,) const ynothrow ImplI(IValueHolder) ImplRet(1) YB_ATTR_nodiscard YB_PURE PDefH(any, Query, uintmax_t) const ynothrow ImplI(IValueHolder) ImplRet(

## Public 属性

| Create
Creation | c
Creation const any &x const _tByteAlloc | Equals
Public 属性 继承自 YSLib::ValueHolder< _tTarget >
| Create
Creation | c

## Private 类型

using | base = AllocatorHolder< _tTarget, _tByteAlloc >

## 额外继承的成员函数

Protected 类型 继承自 ystdex::boxed_value< _tTarget >
using | nothrow_default_constructible = details::is_nt_dc< _tTarget >
Protected 成员函数 继承自 ystdex::boxed_value< _tTarget >
| boxed_value ()
| boxed_value (default_init_t)
| boxed_value (_tParams &&... args)
| boxed_value (const boxed_value &)=default
| boxed_value (boxed_value &&)=default
boxed_value & | operator= (const boxed_value &)=default
boxed_value & | operator= (boxed_value &&)=default
| operator _tTarget & ()
| operator const _tTarget & () const
Protected 属性 继承自 ystdex::boxed_value< _tTarget >
_tTarget | value

## 详细描述

### template<class _type, class _tTarget, class _tByteAlloc>
class YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >

在复制初始化时传播分配器的多态值持有者。

注解
  模板参数指定值类型、存储的目标类型和分配器。

自从
  build 899

在文件 YObject.h 第 732 行定义.

## 成员类型定义说明

## ◆ base

template<class _type , class _tTarget , class _tByteAlloc >

using YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::base = AllocatorHolder<_tTarget, _tByteAlloc>

private

在文件 YObject.h 第 739 行定义.

## ◆ Creation

template<class _type , class _tTarget , class _tByteAlloc >

using YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::Creation = IValueHolder::Creation

在文件 YObject.h 第 735 行定义.

## ◆ value_type

template<class _type , class _tTarget , class _tByteAlloc >

using YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::value_type = _type

在文件 YObject.h 第 736 行定义.

## 构造及析构函数说明

## ◆ PolymorphicAllocatorHolder()

template<class _type , class _tTarget , class _tByteAlloc >
template<typename... _tParams, yimpl(typename=ystdex::exclude_self_params_t< PolymorphicAllocatorHolder, _tParams... >, typename=ystdex::enable_if_t< std::is_constructible< base, _tParams &&... >::value >) >

YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::PolymorphicAllocatorHolder | ( | _tParams &&... | args | ) |

inline

在文件 YObject.h 第 749 行定义.

## 成员函数说明

## ◆ CreateHolder()

template<class _type , class _tTarget , class _tByteAlloc >

Creation const any& x const _tByteAlloc YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::CreateHolder | ( | c | ,
|  | x | ,
|  | value | ,
|  | YSLib::forward_as_tuple( ystdex::as_const(value)) | ,
|  | YSLib::forward_as_tuple(std::move(value)) |
| ) |  |

## ◆ DefDeCopyMoveCtorAssignment()

template<class _type , class _tTarget , class _tByteAlloc >

YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::DefDeCopyMoveCtorAssignment | ( | PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc > |  | ) |

## ◆ ImplI()

template<class _type , class _tTarget , class _tByteAlloc >

Creation const any& x const YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::ImplI | ( | IValueHolder |  | ) |

## 类成员变量说明

## ◆ c

template<class _type , class _tTarget , class _tByteAlloc >

Creation YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::c

在文件 YObject.h 第 754 行定义.

## ◆ Create

template<class _type , class _tTarget , class _tByteAlloc >

YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::Create

在文件 YObject.h 第 754 行定义.

## ◆ Equals

template<class _type , class _tTarget , class _tByteAlloc >

Creation const any& x const _tByteAlloc YSLib::PolymorphicAllocatorHolder< _type, _tTarget, _tByteAlloc >::Equals

在文件 YObject.h 第 761 行定义.

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

- YObject.h