Follow this link to skip to the main content

claraty::N_2D_Array_Iterator< T > Class Template Reference

#include <2d_array_iterator.h>

Collaboration diagram for claraty::N_2D_Array_Iterator< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::bidirectional_iterator_tag iterator_category
typedef T value_type
typedef ptrdiff_t difference_type
typedef T * pointer
typedef T & reference

Public Member Functions

T & operator * ()
T * operator-> ()
const T & operator * () const
const T * operator-> () const
bool operator== (const N_2D_Array_Iterator< T > &rhs) const
bool operator!= (const N_2D_Array_Iterator< T > &rhs) const
N_2D_Array_Iterator< T > & operator++ ()
N_2D_Array_Iterator< T > operator++ (int)
N_2D_Array_Iterator< T > & operator-- ()
N_2D_Array_Iterator< T > operator-- (int)

Private Member Functions

 N_2D_Array_Iterator (T *pt, bool sub=false, int w=0, int s=0)

Private Attributes

T * ptr
int offset
const int width
const int stride
const bool fromSubarray

Friends

class N_2D_Array< T >
class N_2D_Array_const_Iterator< T >

Detailed Description

template<class T>
class claraty::N_2D_Array_Iterator< T >

Definition at line 54 of file 2d_array_iterator.h.


Member Typedef Documentation

template<class T>
typedef std::bidirectional_iterator_tag claraty::N_2D_Array_Iterator< T >::iterator_category

Definition at line 69 of file 2d_array_iterator.h.

template<class T>
typedef T claraty::N_2D_Array_Iterator< T >::value_type

Definition at line 70 of file 2d_array_iterator.h.

template<class T>
typedef ptrdiff_t claraty::N_2D_Array_Iterator< T >::difference_type

Definition at line 71 of file 2d_array_iterator.h.

template<class T>
typedef T* claraty::N_2D_Array_Iterator< T >::pointer

Definition at line 72 of file 2d_array_iterator.h.

template<class T>
typedef T& claraty::N_2D_Array_Iterator< T >::reference

Definition at line 73 of file 2d_array_iterator.h.


Constructor & Destructor Documentation

template<class T>
claraty::N_2D_Array_Iterator< T >::N_2D_Array_Iterator ( T *  pt,
bool  sub = false,
int  w = 0,
int  s = 0 
) [inline, private]

Definition at line 64 of file 2d_array_iterator.h.

00065     : ptr(pt), offset(0), width(w), stride(s), fromSubarray(sub) { }


Member Function Documentation

template<class T>
T& claraty::N_2D_Array_Iterator< T >::operator * (  )  [inline]

Definition at line 78 of file 2d_array_iterator.h.

References claraty::N_2D_Array_Iterator< T >::ptr.

00078 { return *ptr; }

template<class T>
T* claraty::N_2D_Array_Iterator< T >::operator-> (  )  [inline]

Definition at line 79 of file 2d_array_iterator.h.

References claraty::N_2D_Array_Iterator< T >::ptr.

00079 { return ptr; }

template<class T>
const T& claraty::N_2D_Array_Iterator< T >::operator * (  )  const [inline]

Definition at line 81 of file 2d_array_iterator.h.

References claraty::N_2D_Array_Iterator< T >::ptr.

00081 { return *ptr; }

template<class T>
const T* claraty::N_2D_Array_Iterator< T >::operator-> (  )  const [inline]

Definition at line 82 of file 2d_array_iterator.h.

References claraty::N_2D_Array_Iterator< T >::ptr.

00082 { return ptr; }

template<class T>
bool claraty::N_2D_Array_Iterator< T >::operator== ( const N_2D_Array_Iterator< T > &  rhs  )  const [inline]

Definition at line 84 of file 2d_array_iterator.h.

References claraty::N_2D_Array_Iterator< T >::ptr.

00084                                                            {
00085     return ptr == rhs.ptr;
00086   }

template<class T>
bool claraty::N_2D_Array_Iterator< T >::operator!= ( const N_2D_Array_Iterator< T > &  rhs  )  const [inline]

Definition at line 87 of file 2d_array_iterator.h.

00087                                                            {
00088     return !(*this == rhs);
00089   }

template<class T>
N_2D_Array_Iterator<T>& claraty::N_2D_Array_Iterator< T >::operator++ (  )  [inline]

template<class T>
N_2D_Array_Iterator<T> claraty::N_2D_Array_Iterator< T >::operator++ ( int   )  [inline]

Definition at line 100 of file 2d_array_iterator.h.

00100                                          {  // postfix
00101     N_2D_Array_Iterator<T> tmp = *this;
00102     ++*this;
00103     return tmp;
00104   }

template<class T>
N_2D_Array_Iterator<T>& claraty::N_2D_Array_Iterator< T >::operator-- (  )  [inline]

template<class T>
N_2D_Array_Iterator<T> claraty::N_2D_Array_Iterator< T >::operator-- ( int   )  [inline]

Definition at line 114 of file 2d_array_iterator.h.

00114                                          {  // postfix
00115     N_2D_Array_Iterator<T> tmp = *this;
00116     --*this;
00117     return tmp;
00118   }


Friends And Related Function Documentation

template<class T>
friend class N_2D_Array< T > [friend]

Definition at line 61 of file 2d_array_iterator.h.

template<class T>
friend class N_2D_Array_const_Iterator< T > [friend]

Definition at line 62 of file 2d_array_iterator.h.


Member Data Documentation

template<class T>
const int claraty::N_2D_Array_Iterator< T >::width [private]


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