ReactOS  0.4.13-dev-73-gcfe54aa
_iterator_base.h File Reference
#include <stl/_cstddef.h>
#include <stl/type_traits.h>
#include <stl/_ptrs_specialize.h>
Include dependency graph for _iterator_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  input_iterator_tag
 
struct  output_iterator_tag
 
struct  forward_iterator_tag
 
struct  bidirectional_iterator_tag
 
struct  random_access_iterator_tag
 
struct  iterator< _Category, _Tp,,, >
 
struct  iterator< output_iterator_tag, void, void, void, void >
 
struct  iterator_traits< _Iterator >
 
struct  input_iterator< _Tp, _Distance >
 
struct  output_iterator
 
struct  forward_iterator< _Tp, _Distance >
 
struct  bidirectional_iterator< _Tp, _Distance >
 
struct  random_access_iterator< _Tp, _Distance >
 
struct  _Nonconst_traits< _Tp >
 
struct  _Const_traits< _Tp >
 
struct  _Nonconst_traits< _Tp >
 
struct  _Nonconst_Const_traits< _Tp >
 
struct  _Const_Const_traits< _Tp >
 
struct  _Nonconst_Const_traits< _Tp >
 

Macros

#define _STLP_ITERATOR_CATEGORY(_It, _Tp)   _STLP_STD::__iterator_category(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
 
#define _STLP_DISTANCE_TYPE(_It, _Tp)   _STLP_STD::__distance_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
 
#define _STLP_VALUE_TYPE(_It, _Tp)   _STLP_STD::__value_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
 
#define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp)   __false_type()
 
#define _STLP_DIFFERENCE_TYPE(_Iterator)   ptrdiff_t
 
#define _STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits)
 
#define _STLP_CREATE_ITERATOR_TRAITS(Motif, Traits)
 
#define _STLP_CREATE_HASH_ITERATOR_TRAITS(Motif, Traits)
 

Functions

template<class _Tp >
_STLP_END_NAMESPACE _STLP_BEGIN_NAMESPACE _STLP_STD::random_access_iterator_tag __iterator_category (const _Tp *, const __true_type &)
 
template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits< _Iter >::iterator_category __iterator_category (const _Iter &, const __false_type &)
 
template<class _Tp >
ptrdiff_t__distance_type (const _Tp *, const __true_type &)
 
template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits< _Iter >::difference_type * __distance_type (const _Iter &, const __false_type &)
 
template<class _Tp >
_Tp * __value_type (const _Tp *, const __true_type &)
 
template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits< _Iter >::value_type * __value_type (const _Iter &, const __false_type &)
 
template<class _InputIterator >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_DIFFERENCE_TYPE (_InputIterator) _STLP_CALL __distance(const _InputIterator &__first
 
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it (__first)
 
 while (__it !=__last)
 
template<class _RandomAccessIterator >
 _STLP_DIFFERENCE_TYPE (_RandomAccessIterator) _STLP_CALL __distance(const _RandomAccessIterator &__first
 
template<class _InputIterator >
const _RandomAccessIterator const random_access_iterator_tag &_STLP_MOVE_TO_STD_NAMESPACE _STLP_DIFFERENCE_TYPE (_InputIterator) _STLP_CALL distance(_InputIterator __first
 
template<class _InputIterator , class _Distance >
void _STLP_CALL distance (const _InputIterator &__first, const _InputIterator &__last, _Distance &__n)
 
template<class _InputIter , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void _STLP_CALL __advance (_InputIter &__i, _Distance __n, const input_iterator_tag &)
 
template<class _InputIter , class _Distance >
_STLP_INLINE_LOOP void _STLP_CALL __advance (_InputIter &__i, _Distance __n, const output_iterator_tag &)
 
template<class _BidirectionalIterator , class _Distance >
_STLP_INLINE_LOOP void _STLP_CALL __advance (_BidirectionalIterator &__i, _Distance __n, const bidirectional_iterator_tag &)
 
template<class _RandomAccessIterator , class _Distance >
void _STLP_CALL __advance (_RandomAccessIterator &__i, _Distance __n, const random_access_iterator_tag &)
 
template<class _InputIterator , class _Distance >
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance (_InputIterator &__i, _Distance __n)
 

Variables

_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator & __last { return _STLP_PRIV __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator))
 
return __n
 

Macro Definition Documentation

◆ _STLP_CREATE_HASH_ITERATOR_TRAITS

#define _STLP_CREATE_HASH_ITERATOR_TRAITS (   Motif,
  Traits 
)
Value:
_STLP_CREATE_ITERATOR_TRAITS_BASE(NonLocal##Motif, Traits) \
_STLP_CREATE_ITERATOR_TRAITS_BASE(Local##Motif, Traits) \
template <class _Tp> \
struct _##Motif { \
typedef _ConstNonLocal##Motif<_Tp> _ConstTraits; \
typedef _NonLocal##Motif<_Tp> _NonConstTraits; \
typedef _ConstLocal##Motif<_Tp> _ConstLocalTraits; \
typedef _Local##Motif<_Tp> _NonConstLocalTraits; \
}; \
_STLP_MOVE_TO_STD_NAMESPACE
#define _(X)
Definition: i386-dis.c:36
#define _STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits)

Definition at line 450 of file _iterator_base.h.

◆ _STLP_CREATE_ITERATOR_TRAITS

#define _STLP_CREATE_ITERATOR_TRAITS (   Motif,
  Traits 
)
Value:
_STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits)

Definition at line 445 of file _iterator_base.h.

◆ _STLP_CREATE_ITERATOR_TRAITS_BASE

#define _STLP_CREATE_ITERATOR_TRAITS_BASE (   Motif,
  Traits 
)
Value:
template <class _Tp> \
struct _##Motif; \
template <class _Tp> \
struct _Const##Motif : public _STLP_STD::_Const_##Traits<_Tp> { \
typedef _Const##Motif<_Tp> _ConstTraits; \
typedef _##Motif<_Tp> _NonConstTraits; \
}; \
template <class _Tp> \
struct _##Motif : public _STLP_STD::_Nonconst_##Traits<_Tp> { \
typedef _Const##Motif<_Tp> _ConstTraits; \
typedef _##Motif<_Tp> _NonConstTraits; \
};
#define _Const_
Definition: no_sal2.h:18
#define _(X)
Definition: i386-dis.c:36

Definition at line 431 of file _iterator_base.h.

◆ _STLP_DIFFERENCE_TYPE

#define _STLP_DIFFERENCE_TYPE (   _Iterator)    ptrdiff_t

Definition at line 159 of file _iterator_base.h.

◆ _STLP_DISTANCE_TYPE

#define _STLP_DISTANCE_TYPE (   _It,
  _Tp 
)    _STLP_STD::__distance_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())

Definition at line 97 of file _iterator_base.h.

◆ _STLP_IS_REF_TYPE_REAL_REF

#define _STLP_IS_REF_TYPE_REAL_REF (   _It,
  _Tp 
)    __false_type()

Definition at line 99 of file _iterator_base.h.

◆ _STLP_ITERATOR_CATEGORY

#define _STLP_ITERATOR_CATEGORY (   _It,
  _Tp 
)    _STLP_STD::__iterator_category(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())

Definition at line 96 of file _iterator_base.h.

◆ _STLP_VALUE_TYPE

#define _STLP_VALUE_TYPE (   _It,
  _Tp 
)    _STLP_STD::__value_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())

Definition at line 98 of file _iterator_base.h.

Function Documentation

◆ __advance() [1/4]

template<class _InputIter , class _Distance >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void _STLP_CALL __advance ( _InputIter &  __i,
_Distance  __n,
const input_iterator_tag  
)

Definition at line 480 of file _iterator_base.h.

481 { while (__n--) ++__i; }
return __n

Referenced by advance().

◆ __advance() [2/4]

template<class _InputIter , class _Distance >
_STLP_INLINE_LOOP void _STLP_CALL __advance ( _InputIter &  __i,
_Distance  __n,
const output_iterator_tag  
)

Definition at line 486 of file _iterator_base.h.

487 { while (__n--) ++__i; }
return __n

◆ __advance() [3/4]

template<class _BidirectionalIterator , class _Distance >
_STLP_INLINE_LOOP void _STLP_CALL __advance ( _BidirectionalIterator &  __i,
_Distance  __n,
const bidirectional_iterator_tag  
)

Definition at line 498 of file _iterator_base.h.

499  {
500  if (__n > 0)
501  while (__n--) ++__i;
502  else
503  while (__n++) --__i;
504 }
return __n

◆ __advance() [4/4]

template<class _RandomAccessIterator , class _Distance >
void _STLP_CALL __advance ( _RandomAccessIterator &  __i,
_Distance  __n,
const random_access_iterator_tag  
)
inline

Definition at line 508 of file _iterator_base.h.

510 { __i += __n; }
return __n

◆ __distance_type() [1/2]

template<class _Tp >
ptrdiff_t* __distance_type ( const _Tp *  ,
const __true_type  
)
inline

Definition at line 223 of file _iterator_base.h.

224 { return __STATIC_CAST(ptrdiff_t*, 0); }
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247

◆ __distance_type() [2/2]

template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::difference_type* __distance_type ( const _Iter &  ,
const __false_type  
)
inline

Definition at line 228 of file _iterator_base.h.

228  {
229  typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::difference_type _diff_type;
230  return __STATIC_CAST(_diff_type*,0);
231 }
#define _STLP_TYPENAME
Definition: features.h:612
#define __STATIC_CAST(__x, __y)
Definition: features.h:585

◆ __it()

◆ __iterator_category() [1/2]

template<class _Tp >
_STLP_END_NAMESPACE _STLP_BEGIN_NAMESPACE _STLP_STD::random_access_iterator_tag __iterator_category ( const _Tp *  ,
const __true_type  
)
inline

Definition at line 211 of file _iterator_base.h.

#define random_access_iterator_tag
Definition: _abbrevs.h:28

◆ __iterator_category() [2/2]

template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::iterator_category __iterator_category ( const _Iter &  ,
const __false_type  
)
inline

Definition at line 216 of file _iterator_base.h.

216  {
217  typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::iterator_category _Category;
218  return _Category();
219 }
#define _STLP_TYPENAME
Definition: features.h:612

◆ __value_type() [1/2]

template<class _Tp >
_Tp* __value_type ( const _Tp *  ,
const __true_type  
)
inline

Definition at line 235 of file _iterator_base.h.

236 { return __STATIC_CAST(_Tp*, 0); }
#define __STATIC_CAST(__x, __y)
Definition: features.h:585

◆ __value_type() [2/2]

template<class _Iter >
_STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::value_type* __value_type ( const _Iter &  ,
const __false_type  
)
inline

Definition at line 240 of file _iterator_base.h.

240  {
241  typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::value_type _value_type;
242  return __STATIC_CAST(_value_type*,0);
243 }
#define _STLP_TYPENAME
Definition: features.h:612
#define __STATIC_CAST(__x, __y)
Definition: features.h:585

◆ _STLP_DIFFERENCE_TYPE() [1/3]

template<class _InputIterator >
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_DIFFERENCE_TYPE ( _InputIterator  ) const &
inline

◆ _STLP_DIFFERENCE_TYPE() [2/3]

template<class _RandomAccessIterator >
_STLP_DIFFERENCE_TYPE ( _RandomAccessIterator  ) const &
inline

◆ _STLP_DIFFERENCE_TYPE() [3/3]

template<class _InputIterator >
const _RandomAccessIterator const random_access_iterator_tag& _STLP_MOVE_TO_STD_NAMESPACE _STLP_DIFFERENCE_TYPE ( _InputIterator  )
inline

◆ advance()

template<class _InputIterator , class _Distance >
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance ( _InputIterator &  __i,
_Distance  __n 
)
inline

Definition at line 515 of file _iterator_base.h.

516 { _STLP_PRIV __advance(__i, __n, _STLP_ITERATOR_CATEGORY(__i, _InputIterator)); }
#define _STLP_ITERATOR_CATEGORY(_It, _Tp)
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter &__i, _Distance __n, const input_iterator_tag &)
#define _STLP_PRIV
Definition: _dm.h:70
return __n

Referenced by __equal_range(), __inplace_stable_partition(), __lower_bound(), __merge_adaptive(), __merge_without_buffer(), __stable_partition_adaptive(), __upper_bound(), basic_string< char, char_traits< char >, allocator< char > >::_M_insertT(), vector< CTestInfo >::_M_range_insert_aux(), AdvanceTest::adv(), af_latin_metrics_check_digits(), af_shaper_get_elem(), ListTest::allocator_with_state(), SlistTest::allocator_with_state(), apply_pair_value(), vector< CTestInfo >::assign(), deque< IncompleteClass >::assign(), cf2_interpT2CharString(), cff_slot_load(), compute_glyph_metrics(), dexec(), do_insert_range(), ft_synthesize_vertical_metrics(), get_cluster_advance(), get_glyph_cluster_advance(), GPOS_apply_ChainContextPos(), GPOS_apply_ContextPos(), GPOS_apply_feature(), GPOS_apply_lookup(), GPOS_apply_PairAdjustment(), GPOS_apply_SingleAdjustment(), OpenType_apply_GPOS_lookup(), test_insert_one< C >::operator()(), test_insert_n< C >::operator()(), pfr_face_init(), pfr_load_bitmap_metrics(), pfr_slot_load(), ScriptApplyLogicalWidth(), ScriptCPtoX(), ScriptGetLogicalWidths(), ScriptJustify(), ScriptStringGetLogicalWidths(), SlistTest::splice(), test_ScriptXtoX(), MoveConstructorTest::vector_test(), and ZSTD_compressBlock_opt_generic().

◆ distance()

template<class _InputIterator , class _Distance >
void _STLP_CALL distance ( const _InputIterator &  __first,
const _InputIterator &  __last,
_Distance &  __n 
)
inline

Definition at line 366 of file _iterator_base.h.

368 { __n += _STLP_STD::distance(__first, __last); }
void _STLP_CALL distance(const _InputIterator &__first, const _InputIterator &__last, _Distance &__n)
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator & __last
return __n

◆ while()

while ( __it = __last)

Definition at line 319 of file _iterator_base.h.

319  {
320  ++__it; ++__n;
321  }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)
return __n

Variable Documentation

◆ __last

const _RandomAccessIterator const random_access_iterator_tag& _STLP_MOVE_TO_STD_NAMESPACE _InputIterator __last { return _STLP_PRIV __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator))

Definition at line 315 of file _iterator_base.h.

Referenced by distance().

◆ __n

return __n

Definition at line 322 of file _iterator_base.h.

Referenced by __advance(), advance(), distance(), and while().