Follow this link to skip to the main content

claraty::N_2D_Array_const_Iterator< T > Class Template Reference

#include <2d_array_iterator.h>

Collaboration diagram for claraty::N_2D_Array_const_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 const T * pointer
typedef const T & reference

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Friends

class N_2D_Array< T >

Detailed Description

template<class T>
class claraty::N_2D_Array_const_Iterator< T >

Definition at line 122 of file 2d_array_iterator.h.


Member Typedef Documentation

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

Definition at line 136 of file 2d_array_iterator.h.

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

Definition at line 137 of file 2d_array_iterator.h.

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

Definition at line 138 of file 2d_array_iterator.h.

template<class T>
typedef const T* claraty::N_2D_Array_const_Iterator< T >::pointer

Definition at line 139 of file 2d_array_iterator.h.

template<class T>
typedef const T& claraty::N_2D_Array_const_Iterator< T >::reference

Definition at line 140 of file 2d_array_iterator.h.


Constructor & Destructor Documentation

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

Definition at line 131 of file 2d_array_iterator.h.

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

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

Definition at line 145 of file 2d_array_iterator.h.

00146     : ptr(rhs.ptr), offset(rhs.offset), width(rhs.width), stride(rhs.stride),
00147       fromSubarray(rhs.fromSubarray)
00148   {
00149   }


Member Function Documentation

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

Definition at line 152 of file 2d_array_iterator.h.

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

00152 { return *ptr; }

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

Definition at line 153 of file 2d_array_iterator.h.

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

00153 { return ptr; }

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

Definition at line 155 of file 2d_array_iterator.h.

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

00155                                                                  {
00156     return ptr == rhs.ptr;
00157   }

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

Definition at line 158 of file 2d_array_iterator.h.

00158                                                                  {
00159     return !(*this == rhs);
00160   }

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

Definition at line 171 of file 2d_array_iterator.h.

00171                                                {  // postfix
00172     N_2D_Array_const_Iterator<T> tmp = *this;
00173     ++*this;
00174     return tmp;
00175   }

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

Definition at line 185 of file 2d_array_iterator.h.

00185                                                {  // postfix
00186     N_2D_Array_const_Iterator<T> tmp = *this;
00187     --*this;
00188     return tmp;
00189   }


Friends And Related Function Documentation

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

Definition at line 129 of file 2d_array_iterator.h.


Member Data Documentation


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