InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
K2Reverse_iterator< Iterator, T, Distance, Pointer, Reference > Class Template Reference

#include <K2Iterator.h>

Public Types

typedef Iterator iterator_type
 
typedef std::iterator_traits
< Iterator >
::iterator_category 
iterator_category
 
typedef T value_type
 
typedef Pointer pointer
 
typedef Reference reference
 
typedef Distance difference_type
 

Public Member Functions

 K2Reverse_iterator ()
 
 K2Reverse_iterator (Iterator x)
 
Iterator base () const
 
reference operator* () const
 
pointer operator-> () const
 
K2Reverse_iteratoroperator++ ()
 
K2Reverse_iterator operator++ (int)
 
K2Reverse_iteratoroperator-- ()
 
K2Reverse_iterator operator-- (int)
 
K2Reverse_iterator operator+ (difference_type n) const
 
K2Reverse_iteratoroperator+= (difference_type n)
 
K2Reverse_iterator operator- (difference_type n) const
 
K2Reverse_iteratoroperator-= (difference_type n)
 
reference operator[] (difference_type n) const
 

Protected Attributes

Iterator fCurrent
 

Detailed Description

template<class Iterator, class T, class Distance = std::ptrdiff_t, class Pointer = T*, class Reference = T&>
class K2Reverse_iterator< Iterator, T, Distance, Pointer, Reference >

Generic reverse iterator. Implements a "reversed iterator" i.e. an iterator that goes backwards. When this class was developped we were using VC6 and it was difficult to implement certain things with VC6's limited support for templates. This class was tested only for random access iterator types. Template parameter "Iterator" models an iterator type. K2Reverse_iterator uses this iterator to advance.

Constructor & Destructor Documentation

template<class Iterator , class T , class Distance , class Pointer , class Reference >
K2Reverse_iterator< Iterator, T, Distance, Pointer, Reference >::K2Reverse_iterator()
inline

Inline implementations for K2Reverse_iterator member functions.