DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Attributes
myreverse_iterator< _Iterator > Class Template Reference

#include <DGtal/kernel/domains/HyperRectDomain_Iterator.h>

Inheritance diagram for myreverse_iterator< _Iterator >:
[legend]
Collaboration diagram for myreverse_iterator< _Iterator >:
[legend]

Public Types

typedef _Iterator iterator_type
 
typedef std::iterator_traits< _Iterator >::difference_type difference_type
 
typedef std::iterator_traits< _Iterator >::reference reference
 
typedef std::iterator_traits< _Iterator >::pointer pointer
 

Public Member Functions

 myreverse_iterator (iterator_type __x)
 
 myreverse_iterator (const myreverse_iterator &__x)
 
iterator_type base () const
 
reference operator* () const
 
reference operator* ()
 
pointer operator-> () const
 
myreverse_iteratoroperator++ ()
 
myreverse_iterator operator++ (int)
 
myreverse_iteratoroperator-- ()
 
myreverse_iterator operator-- (int)
 
myreverse_iterator operator+ (difference_type __n) const
 
myreverse_iteratoroperator+= (difference_type __n)
 
myreverse_iterator operator- (difference_type __n) const
 
myreverse_iteratoroperator-= (difference_type __n)
 
reference operator[] (difference_type __n) const
 

Protected Attributes

_Iterator current
 
_Iterator prev
 

Detailed Description

template<typename _Iterator>
class myreverse_iterator< _Iterator >

Examples:
doc-examples/range.cpp.

Definition at line 52 of file HyperRectDomain_Iterator.h.

Member Typedef Documentation

template<typename _Iterator>
typedef std::iterator_traits<_Iterator>::difference_type myreverse_iterator< _Iterator >::difference_type

Definition at line 66 of file HyperRectDomain_Iterator.h.

template<typename _Iterator>
typedef _Iterator myreverse_iterator< _Iterator >::iterator_type

Definition at line 64 of file HyperRectDomain_Iterator.h.

template<typename _Iterator>
typedef std::iterator_traits<_Iterator>::pointer myreverse_iterator< _Iterator >::pointer

Definition at line 68 of file HyperRectDomain_Iterator.h.

template<typename _Iterator>
typedef std::iterator_traits<_Iterator>::reference myreverse_iterator< _Iterator >::reference

Definition at line 67 of file HyperRectDomain_Iterator.h.

Constructor & Destructor Documentation

template<typename _Iterator>
myreverse_iterator< _Iterator >::myreverse_iterator ( iterator_type  __x)
inlineexplicit
template<typename _Iterator>
myreverse_iterator< _Iterator >::myreverse_iterator ( const myreverse_iterator< _Iterator > &  __x)
inline

Definition at line 76 of file HyperRectDomain_Iterator.h.

Member Function Documentation

template<typename _Iterator>
iterator_type myreverse_iterator< _Iterator >::base ( ) const
inline

Definition at line 79 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::current.

80  { return current; }
template<typename _Iterator>
reference myreverse_iterator< _Iterator >::operator* ( ) const
inline
template<typename _Iterator>
reference myreverse_iterator< _Iterator >::operator* ( )
inline

Definition at line 85 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::prev.

86  { return *prev; }
template<typename _Iterator>
myreverse_iterator myreverse_iterator< _Iterator >::operator+ ( difference_type  __n) const
inline
template<typename _Iterator>
myreverse_iterator& myreverse_iterator< _Iterator >::operator++ ( )
inline
template<typename _Iterator>
myreverse_iterator myreverse_iterator< _Iterator >::operator++ ( int  )
inline

Definition at line 96 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::operator++().

97  {
98  myreverse_iterator __tmp = *this;
99  operator++();
100  return __tmp;
101  }
myreverse_iterator & operator++()
template<typename _Iterator>
myreverse_iterator& myreverse_iterator< _Iterator >::operator+= ( difference_type  __n)
inline

Definition at line 119 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::current, and myreverse_iterator< _Iterator >::prev.

120  {
121  current -= __n; prev = current; --prev;
122  return *this;
123  }
template<typename _Iterator>
myreverse_iterator myreverse_iterator< _Iterator >::operator- ( difference_type  __n) const
inline
template<typename _Iterator>
myreverse_iterator& myreverse_iterator< _Iterator >::operator-- ( )
inline
template<typename _Iterator>
myreverse_iterator myreverse_iterator< _Iterator >::operator-- ( int  )
inline

Definition at line 109 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::operator--().

110  {
111  myreverse_iterator __tmp = *this;
112  operator--();
113  return __tmp;
114  }
myreverse_iterator & operator--()
template<typename _Iterator>
myreverse_iterator& myreverse_iterator< _Iterator >::operator-= ( difference_type  __n)
inline

Definition at line 128 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::current, and myreverse_iterator< _Iterator >::prev.

129  {
130  current += __n; prev = current; --prev;
131  return *this;
132  }
template<typename _Iterator>
pointer myreverse_iterator< _Iterator >::operator-> ( ) const
inline

Definition at line 88 of file HyperRectDomain_Iterator.h.

References myreverse_iterator< _Iterator >::operator*().

89  { return &(operator*()); }
reference operator*() const
template<typename _Iterator>
reference myreverse_iterator< _Iterator >::operator[] ( difference_type  __n) const
inline

Definition at line 134 of file HyperRectDomain_Iterator.h.

135  { return *(*this + __n); }

Field Documentation

template<typename _Iterator>
_Iterator myreverse_iterator< _Iterator >::current
protected
template<typename _Iterator>
_Iterator myreverse_iterator< _Iterator >::prev
protected

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