STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Attributes | Private Types | List of all members
reverse_iterator< _RanIt > Class Template Reference
Inheritance diagram for reverse_iterator< _RanIt >:
iterator< iterator_traits< _RanIt >::iterator_category, iterator_traits< _RanIt >::value_type, iterator_traits< _RanIt >::difference_type, iterator_traits< _RanIt >::pointer, iterator_traits< _RanIt >::reference >

Public Types

typedef iterator_traits< _RanIt >::difference_type difference_type
 
typedef iterator_traits< _RanIt >::pointer pointer
 
typedef iterator_traits< _RanIt >::reference reference
 
typedef _RanIt iterator_type
 
- Public Types inherited from iterator< iterator_traits< _RanIt >::iterator_category, iterator_traits< _RanIt >::value_type, iterator_traits< _RanIt >::difference_type, iterator_traits< _RanIt >::pointer, iterator_traits< _RanIt >::reference >
typedef iterator_traits< _RanIt >::iterator_category iterator_category
 
typedef iterator_traits< _RanIt >::value_type value_type
 
typedef iterator_traits< _RanIt >::difference_type difference_type
 
typedef iterator_traits< _RanIt >::pointer pointer
 
typedef iterator_traits< _RanIt >::reference reference
 

Public Member Functions

 reverse_iterator ()
 
 reverse_iterator (_RanIt _Right)
 
template<class _Other >
 reverse_iterator (const reverse_iterator< _Other > &_Right)
 
template<class _Other >
_Mytoperator= (const reverse_iterator< _Other > &_Right)
 
_RanIt base () const
 
reference operator* () const
 
pointer operator-> () const
 
_Mytoperator++ ()
 
_Myt operator++ (int)
 
_Mytoperator-- ()
 
_Myt operator-- (int)
 
_Mytoperator+= (difference_type _Off)
 
_Myt operator+ (difference_type _Off) const
 
_Mytoperator-= (difference_type _Off)
 
_Myt operator- (difference_type _Off) const
 
reference operator[] (difference_type _Off) const
 

Protected Attributes

_RanIt current
 

Private Types

typedef reverse_iterator< _RanIt > _Myt
 

Member Typedef Documentation

template<class _RanIt>
typedef reverse_iterator<_RanIt> reverse_iterator< _RanIt >::_Myt
private
template<class _RanIt>
typedef iterator_traits<_RanIt>::difference_type reverse_iterator< _RanIt >::difference_type
template<class _RanIt>
typedef _RanIt reverse_iterator< _RanIt >::iterator_type
template<class _RanIt>
typedef iterator_traits<_RanIt>::pointer reverse_iterator< _RanIt >::pointer
template<class _RanIt>
typedef iterator_traits<_RanIt>::reference reverse_iterator< _RanIt >::reference

Constructor & Destructor Documentation

template<class _RanIt>
reverse_iterator< _RanIt >::reverse_iterator ( )
inline
1175  : current()
1176  { // construct with value-initialized wrapped iterator
1177  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
reverse_iterator< _RanIt >::reverse_iterator ( _RanIt  _Right)
inlineexplicit
1180  : current(_Right)
1181  { // construct wrapped iterator from _Right
1182  }
_RanIt current
Definition: xutility:1269
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _RanIt>
template<class _Other >
reverse_iterator< _RanIt >::reverse_iterator ( const reverse_iterator< _Other > &  _Right)
inline
1186  : current(_Right.base())
1187  { // initialize with compatible base
1188  }
_RanIt current
Definition: xutility:1269
_RanIt base() const
Definition: xutility:1197

Member Function Documentation

template<class _RanIt>
_RanIt reverse_iterator< _RanIt >::base ( ) const
inline
1198  { // return wrapped iterator
1199  return (current);
1200  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
reference reverse_iterator< _RanIt >::operator* ( ) const
inline
1203  { // return designated value
1204  _RanIt _Tmp = current;
1205  return (*--_Tmp);
1206  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
_Myt reverse_iterator< _RanIt >::operator+ ( difference_type  _Off) const
inline
1248  { // return this + integer
1249  return (_Myt(current - _Off));
1250  }
_RanIt current
Definition: xutility:1269
reverse_iterator< _RanIt > _Myt
Definition: xutility:1166
template<class _RanIt>
_Myt& reverse_iterator< _RanIt >::operator++ ( )
inline
1214  { // preincrement
1215  --current;
1216  return (*this);
1217  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
_Myt reverse_iterator< _RanIt >::operator++ ( int  )
inline
1220  { // postincrement
1221  _Myt _Tmp = *this;
1222  --current;
1223  return (_Tmp);
1224  }
_RanIt current
Definition: xutility:1269
reverse_iterator< _RanIt > _Myt
Definition: xutility:1166
template<class _RanIt>
_Myt& reverse_iterator< _RanIt >::operator+= ( difference_type  _Off)
inline
1242  { // increment by integer
1243  current -= _Off;
1244  return (*this);
1245  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
_Myt reverse_iterator< _RanIt >::operator- ( difference_type  _Off) const
inline
1259  { // return this - integer
1260  return (_Myt(current + _Off));
1261  }
_RanIt current
Definition: xutility:1269
reverse_iterator< _RanIt > _Myt
Definition: xutility:1166
template<class _RanIt>
_Myt& reverse_iterator< _RanIt >::operator-- ( )
inline
1227  { // predecrement
1228  ++current;
1229  return (*this);
1230  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
_Myt reverse_iterator< _RanIt >::operator-- ( int  )
inline
1233  { // postdecrement
1234  _Myt _Tmp = *this;
1235  ++current;
1236  return (_Tmp);
1237  }
_RanIt current
Definition: xutility:1269
reverse_iterator< _RanIt > _Myt
Definition: xutility:1166
template<class _RanIt>
_Myt& reverse_iterator< _RanIt >::operator-= ( difference_type  _Off)
inline
1253  { // decrement by integer
1254  current += _Off;
1255  return (*this);
1256  }
_RanIt current
Definition: xutility:1269
template<class _RanIt>
pointer reverse_iterator< _RanIt >::operator-> ( ) const
inline
1209  { // return pointer to class object
1210  return (pointer_traits<pointer>::pointer_to(**this));
1211  }
Definition: xmemory0:244
template<class _RanIt>
template<class _Other >
_Myt& reverse_iterator< _RanIt >::operator= ( const reverse_iterator< _Other > &  _Right)
inline
1192  { // assign from compatible base
1193  current = _Right.base();
1194  return (*this);
1195  }
_RanIt current
Definition: xutility:1269
_RanIt base() const
Definition: xutility:1197
template<class _RanIt>
reference reverse_iterator< _RanIt >::operator[] ( difference_type  _Off) const
inline
1264  { // subscript
1265  return (*(*this + _Off));
1266  }

Member Data Documentation

template<class _RanIt>
_RanIt reverse_iterator< _RanIt >::current
protected

The documentation for this class was generated from the following file: