NL3D::CAdvance1Iterator< T, PT > Struct Template Reference

#include <ps_iterator.h>


Detailed Description

template<typename T, typename PT>
struct NL3D::CAdvance1Iterator< T, PT >

Class that manage iterator progression with a step of 1 We assume that T::value_type gives the operator* return type T is the type of the iterator. NOTE: this iterator is not intended to serves with STL algo, it doesn't support all the needed features, ++ and * operator are provided as syntaxic sugars.. This iterator is READ-ONLY TP is the type pointed by T

Definition at line 52 of file ps_iterator.h.

Public Member Functions

void advance (uint numSteps)
void advance ()
 CAdvance1Iterator (T it, uint32 index=0)
 create this iterator from the start of a container, and a given position (expressed in fixed point)

 CAdvance1Iterator ()
const PT & get () const
const PT & operator * () const
bool operator!= (const CAdvance1Iterator &other) const
CAdvance1Iterator operator+ (sint quantity)
CAdvance1Iterator operator++ (int)
CAdvance1Iteratoroperator++ ()
CAdvance1Iteratoroperator+= (sint quantity)
bool operator== (const CAdvance1Iterator &other) const
 return the step in a 16:16 format


Data Fields

It


Constructor & Destructor Documentation

template<typename T, typename PT>
NL3D::CAdvance1Iterator< T, PT >::CAdvance1Iterator  )  [inline]
 

Definition at line 56 of file ps_iterator.h.

Referenced by NL3D::CAdvance1Iterator< T, PT >::operator+().

00056 {}

template<typename T, typename PT>
NL3D::CAdvance1Iterator< T, PT >::CAdvance1Iterator it,
uint32  index = 0
[inline]
 

create this iterator from the start of a container, and a given position (expressed in fixed point)

Definition at line 58 of file ps_iterator.h.

References index, NL3D::CAdvance1Iterator< T, PT >::It, and uint32.

00059                 {                       
00060                         It = it + index;
00061                 }                                               


Member Function Documentation

template<typename T, typename PT>
void NL3D::CAdvance1Iterator< T, PT >::advance uint  numSteps  )  [inline]
 

Definition at line 64 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::It, and uint.

00065                 { 
00066                         It = It + numSteps; 
00067                 }

template<typename T, typename PT>
void NL3D::CAdvance1Iterator< T, PT >::advance  )  [inline]
 

Definition at line 63 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::It.

Referenced by NL3D::CAdvance1Iterator< T, PT >::operator++().

00063 { ++It; }

template<typename T, typename PT>
const PT& NL3D::CAdvance1Iterator< T, PT >::get  )  const [inline]
 

Definition at line 62 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::It.

Referenced by NL3D::CAdvance1Iterator< T, PT >::operator *().

00062 { return *It; }

template<typename T, typename PT>
const PT& NL3D::CAdvance1Iterator< T, PT >::operator *  )  const [inline]
 

Definition at line 70 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::get().

00070 { return get(); }               

template<typename T, typename PT>
bool NL3D::CAdvance1Iterator< T, PT >::operator!= const CAdvance1Iterator< T, PT > &  other  )  const [inline]
 

Definition at line 75 of file ps_iterator.h.

00075 { return !(*this == other); }

template<typename T, typename PT>
CAdvance1Iterator NL3D::CAdvance1Iterator< T, PT >::operator+ sint  quantity  )  [inline]
 

Definition at line 76 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::CAdvance1Iterator(), NL3D::CAdvance1Iterator< T, PT >::It, and sint.

00076 { return CAdvance1Iterator(It + quantity); }

template<typename T, typename PT>
CAdvance1Iterator NL3D::CAdvance1Iterator< T, PT >::operator++ int   )  [inline]
 

Definition at line 69 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::advance().

00069 { CAdvance1Iterator tmp = this; advance(); return tmp; }                

template<typename T, typename PT>
CAdvance1Iterator& NL3D::CAdvance1Iterator< T, PT >::operator++  )  [inline]
 

Definition at line 68 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::advance().

00068 { advance(); return *this; }

template<typename T, typename PT>
CAdvance1Iterator& NL3D::CAdvance1Iterator< T, PT >::operator+= sint  quantity  )  [inline]
 

Definition at line 77 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::It, and sint.

00077 { It = It + quantity; return *this; }

template<typename T, typename PT>
bool NL3D::CAdvance1Iterator< T, PT >::operator== const CAdvance1Iterator< T, PT > &  other  )  const [inline]
 

return the step in a 16:16 format

const T &operator -> () const { return It; }

Definition at line 74 of file ps_iterator.h.

References NL3D::CAdvance1Iterator< T, PT >::It.

00074 { return other.It == It; }


Field Documentation

template<typename T, typename PT>
T NL3D::CAdvance1Iterator< T, PT >::It
 

Definition at line 54 of file ps_iterator.h.

Referenced by NL3D::CAdvance1Iterator< T, PT >::advance(), NL3D::CAdvance1Iterator< T, PT >::CAdvance1Iterator(), NL3D::CAdvance1Iterator< T, PT >::get(), NL3D::CAdvance1Iterator< T, PT >::operator+(), NL3D::CAdvance1Iterator< T, PT >::operator+=(), and NL3D::CAdvance1Iterator< T, PT >::operator==().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 06:44:19 2004 for NeL by doxygen 1.3.6