ReactOS  0.4.14-dev-114-gc8cbd56
_iterator.h File Reference
#include <stl/_pair.h>
#include <stl/_alloc.h>
Include dependency graph for _iterator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DBG_iter_base< _Container >
 
struct  _DBG_iter_mid< _Container, _Traits >
 
struct  _DBG_iter< _Container, _Traits >
 
class  __construct_checker< _Container >
 

Functions

template<class _Iterator >
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE void _Decrement (_Iterator &__it, const bidirectional_iterator_tag &)
 
template<class _Iterator >
void _Decrement (_Iterator &__it, const random_access_iterator_tag &)
 
template<class _Iterator >
void _Decrement (_Iterator &__it, const forward_iterator_tag &)
 
template<class _Iterator >
void _Advance (_Iterator &, ptrdiff_t, const forward_iterator_tag &)
 
template<class _Iterator >
void _Advance (_Iterator &__it, ptrdiff_t, const bidirectional_iterator_tag &)
 
template<class _Iterator >
void _Advance (_Iterator &__it, ptrdiff_t __n, const random_access_iterator_tag &)
 
template<class _Iterator >
ptrdiff_t _DBG_distance (const _Iterator &__x, const _Iterator &__y, const random_access_iterator_tag &)
 
template<class _Iterator >
ptrdiff_t _DBG_distance (const _Iterator &, const _Iterator &, const forward_iterator_tag &)
 
template<class _Iterator >
ptrdiff_t _DBG_distance (const _Iterator &, const _Iterator &, const bidirectional_iterator_tag &)
 
template<class _Iterator >
bool _CompareIt (const _Iterator &, const _Iterator &, const forward_iterator_tag &)
 
template<class _Iterator >
bool _CompareIt (const _Iterator &, const _Iterator &, const bidirectional_iterator_tag &)
 
template<class _Iterator >
bool _CompareIt (const _Iterator &__x, const _Iterator &__y, const random_access_iterator_tag &)
 
template<class _Iterator >
bool _Dereferenceable (const _Iterator &__it)
 
template<class _Iterator >
bool _Incrementable (const _Iterator &__it, ptrdiff_t __n, const forward_iterator_tag &)
 
template<class _Iterator >
bool _Incrementable (const _Iterator &__it, ptrdiff_t __n, const bidirectional_iterator_tag &)
 
template<class _Iterator >
bool _Incrementable (const _Iterator &__it, ptrdiff_t __n, const random_access_iterator_tag &)
 
template<class _Container >
ptrdiff_t operator- (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator== (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator< (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator> (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator>= (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator<= (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container >
bool operator!= (const _DBG_iter_base< _Container > &__x, const _DBG_iter_base< _Container > &__y)
 
template<class _Container , class _Traits >
_DBG_iter< _Container, _Traits > operator+ (ptrdiff_t __n, const _DBG_iter< _Container, _Traits > &__it)
 
template<class _Iterator >
_Iterator _Non_Dbg_iter (_Iterator __it)
 

Function Documentation

◆ _Advance() [1/3]

template<class _Iterator >
void _Advance ( _Iterator &  ,
ptrdiff_t  ,
const forward_iterator_tag  
)

Definition at line 49 of file _iterator.h.

50 { _STLP_ASSERT(0) }
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

Referenced by _DBG_iter_base< _Container >::__advance().

◆ _Advance() [2/3]

template<class _Iterator >
void _Advance ( _Iterator &  __it,
ptrdiff_t  ,
const bidirectional_iterator_tag  
)

Definition at line 53 of file _iterator.h.

54 { _STLP_ASSERT(0) }
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _Advance() [3/3]

template<class _Iterator >
void _Advance ( _Iterator &  __it,
ptrdiff_t  __n,
const random_access_iterator_tag  
)

Definition at line 57 of file _iterator.h.

58 { __it += __n; }
return __n
Definition: _algo.h:75
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

◆ _CompareIt() [1/3]

template<class _Iterator >
bool _CompareIt ( const _Iterator &  ,
const _Iterator &  ,
const forward_iterator_tag  
)

Definition at line 77 of file _iterator.h.

77  {
78  _STLP_ASSERT(0)
79  return false;
80 }
return
Definition: dirsup.c:529
#define false
Definition: stdbool.h:38
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

Referenced by operator<(), operator<=(), operator>(), and operator>=().

◆ _CompareIt() [2/3]

template<class _Iterator >
bool _CompareIt ( const _Iterator &  ,
const _Iterator &  ,
const bidirectional_iterator_tag  
)

Definition at line 83 of file _iterator.h.

83  {
84  _STLP_ASSERT(0)
85  return false;
86 }
return
Definition: dirsup.c:529
#define false
Definition: stdbool.h:38
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _CompareIt() [3/3]

template<class _Iterator >
bool _CompareIt ( const _Iterator &  __x,
const _Iterator &  __y,
const random_access_iterator_tag  
)

Definition at line 89 of file _iterator.h.

90 { return __x < __y; }

◆ _DBG_distance() [1/3]

template<class _Iterator >
ptrdiff_t _DBG_distance ( const _Iterator &  __x,
const _Iterator &  __y,
const random_access_iterator_tag  
)

Definition at line 61 of file _iterator.h.

62 { return __x - __y; }

Referenced by operator-().

◆ _DBG_distance() [2/3]

template<class _Iterator >
ptrdiff_t _DBG_distance ( const _Iterator &  ,
const _Iterator &  ,
const forward_iterator_tag  
)

Definition at line 65 of file _iterator.h.

65  {
66  _STLP_ASSERT(0)
67  return 0;
68 }
return
Definition: dirsup.c:529
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _DBG_distance() [3/3]

template<class _Iterator >
ptrdiff_t _DBG_distance ( const _Iterator &  ,
const _Iterator &  ,
const bidirectional_iterator_tag  
)

Definition at line 71 of file _iterator.h.

71  {
72  _STLP_ASSERT(0)
73  return 0;
74 }
return
Definition: dirsup.c:529
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _Decrement() [1/3]

template<class _Iterator >
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE void _Decrement ( _Iterator &  __it,
const bidirectional_iterator_tag  
)

Definition at line 37 of file _iterator.h.

38 { --__it; }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

Referenced by _DBG_iter_base< _Container >::__decrement().

◆ _Decrement() [2/3]

template<class _Iterator >
void _Decrement ( _Iterator &  __it,
const random_access_iterator_tag  
)

Definition at line 41 of file _iterator.h.

42 { --__it; }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

◆ _Decrement() [3/3]

template<class _Iterator >
void _Decrement ( _Iterator &  __it,
const forward_iterator_tag  
)

Definition at line 45 of file _iterator.h.

46 { _STLP_ASSERT(0) }
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _Dereferenceable()

◆ _Incrementable() [1/3]

template<class _Iterator >
bool _Incrementable ( const _Iterator &  __it,
ptrdiff_t  __n,
const forward_iterator_tag  
)

Definition at line 97 of file _iterator.h.

98 { return (__n == 1) && _Dereferenceable(__it); }
return __n
Definition: _algo.h:75
bool _Dereferenceable(const _Iterator &__it)
Definition: _iterator.h:93
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

Referenced by _DBG_iter_base< _Container >::__advance(), _DBG_iter_base< _Container >::__decrement(), and _DBG_iter_base< _Container >::__increment().

◆ _Incrementable() [2/3]

template<class _Iterator >
bool _Incrementable ( const _Iterator &  __it,
ptrdiff_t  __n,
const bidirectional_iterator_tag  
)

Definition at line 101 of file _iterator.h.

101  {
102  typedef typename _Iterator::_Container_type __container_type;
103  __container_type* __c = __it._Get_container_ptr();
104  return (__c != 0) && ((__n == 1 && __it._M_iterator != __c->end() ) ||
105  (__n == -1 && __it._M_iterator != __c->begin()));
106 }
return __n
Definition: _algo.h:75
#define __c
Definition: schilyio.h:209
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

◆ _Incrementable() [3/3]

template<class _Iterator >
bool _Incrementable ( const _Iterator &  __it,
ptrdiff_t  __n,
const random_access_iterator_tag  
)

Definition at line 109 of file _iterator.h.

109  {
110  typedef typename _Iterator::_Container_type __container_type;
111  __container_type* __c = __it._Get_container_ptr();
112  if (__c == 0) return false;
113  ptrdiff_t __new_pos = (__it._M_iterator - __c->begin()) + __n;
114  return (__new_pos >= 0) && (__STATIC_CAST(typename __container_type::size_type, __new_pos) <= __c->size());
115 }
return __n
Definition: _algo.h:75
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define __c
Definition: schilyio.h:209
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247

◆ _Non_Dbg_iter()

template<class _Iterator >
_Iterator _Non_Dbg_iter ( _Iterator  __it)
inline

Definition at line 362 of file _iterator.h.

363 { return __it; }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

Referenced by list< BookmarkNode >::insert(), vector< CTestInfo >::insert(), list< BookmarkNode >::resize(), and vector< CTestInfo >::resize().

◆ operator!=()

template<class _Container >
bool operator!= ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 345 of file _iterator.h.

346  {
347  _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
348  return __x._M_iterator != __y._M_iterator;
349 }
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator+()

template<class _Container , class _Traits >
_DBG_iter<_Container, _Traits> operator+ ( ptrdiff_t  __n,
const _DBG_iter< _Container, _Traits > &  __it 
)
inline

Definition at line 355 of file _iterator.h.

355  {
357  return __tmp += __n;
358 }
return __n
Definition: _algo.h:75
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

◆ operator-()

template<class _Container >
ptrdiff_t operator- ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)

Definition at line 175 of file _iterator.h.

176  {
177  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Iterator_category;
178  _STLP_DEBUG_CHECK(__check_same_owner(__x, __y))
179  return _DBG_distance(__x._M_iterator,__y._M_iterator, _Iterator_category());
180 }
_Container::_Iterator_category _Iterator_category
Definition: _iterator.h:133
ptrdiff_t _DBG_distance(const _Iterator &__x, const _Iterator &__y, const random_access_iterator_tag &)
Definition: _iterator.h:61
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator<()

template<class _Container >
bool operator< ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 313 of file _iterator.h.

313  {
314  _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
315  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
316  return _CompareIt(__x._M_iterator , __y._M_iterator, _Category());
317 }
_Container::_Iterator_category _Iterator_category
Definition: _iterator.h:133
bool _CompareIt(const _Iterator &, const _Iterator &, const forward_iterator_tag &)
Definition: _iterator.h:77
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator<=()

template<class _Container >
bool operator<= ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 337 of file _iterator.h.

338  {
339  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
340  return !_CompareIt(__y._M_iterator , __x._M_iterator, _Category());
341 }
_Container::_Iterator_category _Iterator_category
Definition: _iterator.h:133
bool _CompareIt(const _Iterator &, const _Iterator &, const forward_iterator_tag &)
Definition: _iterator.h:77
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator==()

template<class _Container >
bool operator== ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 306 of file _iterator.h.

306  {
307  _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
308  return __x._M_iterator == __y._M_iterator;
309 }
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator>()

template<class _Container >
bool operator> ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 321 of file _iterator.h.

322  {
323  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
324  return _CompareIt(__y._M_iterator , __x._M_iterator, _Category());
325 }
_Container::_Iterator_category _Iterator_category
Definition: _iterator.h:133
bool _CompareIt(const _Iterator &, const _Iterator &, const forward_iterator_tag &)
Definition: _iterator.h:77
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153

◆ operator>=()

template<class _Container >
bool operator>= ( const _DBG_iter_base< _Container > &  __x,
const _DBG_iter_base< _Container > &  __y 
)
inline

Definition at line 329 of file _iterator.h.

329  {
330  _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
331  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
332  return !_CompareIt(__x._M_iterator , __y._M_iterator, _Category());
333 }
_Container::_Iterator_category _Iterator_category
Definition: _iterator.h:133
bool _CompareIt(const _Iterator &, const _Iterator &, const forward_iterator_tag &)
Definition: _iterator.h:77
#define _STLP_DEBUG_CHECK(expr)
Definition: _debug.h:440
_Nonconst_iterator _M_iterator
Definition: _iterator.h:153