YSTest: ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > 模板类 参考

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

Public 成员函数 | Protected 属性 | 友元 | 所有成员列表
ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > 模板类 参考
Iterators

成员下标迭代器。 更多...

`#include <iterator.hpp>`

类 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > 继承关系图:
[图例]
ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > 的协作图:
[图例]

## Public 类型

using | container_type = _tCon
using | iterator_category = std::random_access_iterator_tag
using | value_type = _type
using | difference_type = _tDifference
using | pointer = _tPointer
using | reference = _tReference

## Public 成员函数

| subscriptive_iterator ()=default
| subscriptive_iterator (container_type &c, size_t i)
_tCon * | container () const
size_t | get_index () const
subscriptive_iterator & | operator+= (difference_type n)
subscriptive_iterator & | operator-= (difference_type n)
reference | operator* () const
subscriptive_iterator & | operator++ ()
subscriptive_iterator | operator-- ()

## Protected 属性

_tCon * | container_ptr = {}
size_t | index = size_t(-1)

## 友元

bool | operator== (const subscriptive_iterator &x, const subscriptive_iterator &y)
bool | operator< (const subscriptive_iterator &x, const subscriptive_iterator &y)
_tDifference | operator- (const subscriptive_iterator &x, const subscriptive_iterator &y)
bool | is_undereferenceable (const subscriptive_iterator &i)

## 详细描述

### template<class _tCon, typename _type, typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
class ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >

成员下标迭代器。

警告
  非虚析构。

自从
  build 556

根据指定类型提供的下标操作枚举其成员的随机访问迭代器。

在文件 iterator.hpp 第 1243 行定义.

## 成员类型定义说明

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::container_type = _tCon

自从
  build 356

在文件 iterator.hpp 第 1250 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::difference_type = _tDifference

在文件 iterator.hpp 第 1253 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::iterator_category = std::random_access_iterator_tag

在文件 iterator.hpp 第 1251 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::pointer = _tPointer

在文件 iterator.hpp 第 1254 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::reference = _tReference

在文件 iterator.hpp 第 1255 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::value_type = _type

在文件 iterator.hpp 第 1252 行定义.

## 构造及析构函数说明

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::subscriptive_iterator | ( |  | ) |

default

后置条件
  `!is_undereferenceable(*this)` 。

自从
  build 566

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::subscriptive_iterator | ( | container_type & | c,
|  | size_t | i
| ) |  |

inline

自从
  build 522

在文件 iterator.hpp 第 1270 行定义.

## 成员函数说明

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

_tCon* ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::container | ( |  | ) | const

inline

自从
  build 461

在文件 iterator.hpp 第 1345 行定义.

参考 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::container_ptr.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

size_t ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::get_index | ( |  | ) | const

inline

在文件 iterator.hpp 第 1351 行定义.

参考 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::index.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

reference ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator* | ( |  | ) | const

inline

自从
  build 461

在文件 iterator.hpp 第 1295 行定义.

参考 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::index, ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::is_undereferenceable , 以及 yassume.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

subscriptive_iterator& ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator++ | ( |  | ) |

inline

在文件 iterator.hpp 第 1302 行定义.

参考 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::index.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

subscriptive_iterator& ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator+= | ( | difference_type | n | ) |

inline

自从
  build 356

在文件 iterator.hpp 第 1277 行定义.

参考 platform::n.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

subscriptive_iterator ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator-- | ( |  | ) |

inline

在文件 iterator.hpp 第 1309 行定义.

参考 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::index.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

subscriptive_iterator& ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator-= | ( | difference_type | n | ) |

inline

在文件 iterator.hpp 第 1284 行定义.

参考 platform::n , 以及 yassume.

## 友元及相关函数文档

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

bool is_undereferenceable | ( | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | i | ) |

friend

自从
  build 556

在文件 iterator.hpp 第 1358 行定义.

参考自 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator*().

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

_tDifference operator- | ( | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | x,
|  | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | y
| ) |  |

friend

自从
  build 600

在文件 iterator.hpp 第 1336 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

bool operator< | ( | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | x,
|  | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | y
| ) |  |

friend

自从
  build 577

在文件 iterator.hpp 第 1327 行定义.

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

bool operator== | ( | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | x,
|  | const subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference > & | y
| ) |  |

friend

自从
  build 577

在文件 iterator.hpp 第 1318 行定义.

## 类成员变量说明

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

_tCon* ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::container_ptr = {}

protected

在文件 iterator.hpp 第 1259 行定义.

参考自 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::container().

template<class _tCon , typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

size_t ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::index = size_t(-1)

protected

在文件 iterator.hpp 第 1260 行定义.

参考自 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::get_index(), ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator*(), ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator++() , 以及 ystdex::subscriptive_iterator< _tCon, _type, _tDifference, _tPointer, _tReference >::operator--().

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

- iterator.hpp