ResizeArrayPrimIter< T > Class Template Reference

#include <ResizeArrayPrimIter.h>

List of all members.

Public Member Functions

 ResizeArrayPrimIter (void)
 ResizeArrayPrimIter (ResizeArray< T > &ra)
 ResizeArrayPrimIter (const ResizeArrayPrimIter< T > &iter)
ResizeArrayPrimIter< T > & operator= (const ResizeArrayPrimIter< T > &iter)
 ~ResizeArrayPrimIter (void)
ResizeArrayPrimIter< T > begin (void) const
ResizeArrayPrimIter< T > end (void) const
int operator!= (const ResizeArrayPrimIter< T > &iter) const
int operator== (const ResizeArrayPrimIter< T > &iter) const
ResizeArrayPrimIter< T > operator++ (void)
ResizeArrayPrimIter< T > operator++ (int)
T & operator * (void) const


Detailed Description

template<class T>
class ResizeArrayPrimIter< T >

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 15 of file ResizeArrayPrimIter.h.


Constructor & Destructor Documentation

template<class T>
ResizeArrayPrimIter< T >::ResizeArrayPrimIter ( void   )  [inline]

Definition at line 22 of file ResizeArrayPrimIter.h.

00022                               {
00023       array = NULL;
00024       currentIndex = 0;
00025     }

template<class T>
ResizeArrayPrimIter< T >::ResizeArrayPrimIter ( ResizeArray< T > &  ra  )  [inline]

Definition at line 27 of file ResizeArrayPrimIter.h.

00027                                             {
00028       array = &ra;
00029       currentIndex = 0;
00030     }

template<class T>
ResizeArrayPrimIter< T >::ResizeArrayPrimIter ( const ResizeArrayPrimIter< T > &  iter  )  [inline]

Definition at line 32 of file ResizeArrayPrimIter.h.

References ResizeArrayPrimIter< T >::array, and ResizeArrayPrimIter< T >::currentIndex.

00032                                                             {
00033       array = iter.array;
00034       currentIndex = iter.currentIndex;
00035     }

template<class T>
ResizeArrayPrimIter< T >::~ResizeArrayPrimIter ( void   )  [inline]

Definition at line 43 of file ResizeArrayPrimIter.h.

00043 {}


Member Function Documentation

template<class T>
ResizeArrayPrimIter<T> ResizeArrayPrimIter< T >::begin ( void   )  const [inline]

Definition at line 45 of file ResizeArrayPrimIter.h.

References ResizeArrayPrimIter< T >::array, and ResizeArrayPrimIter< T >::currentIndex.

Referenced by Patch::gbisP2Ready(), and Patch::gbisP3Ready().

00045                                              {
00046       ResizeArrayPrimIter<T> iter;
00047       iter.array = array;
00048       iter.currentIndex = 0;
00049       return(iter);
00050     }

template<class T>
ResizeArrayPrimIter<T> ResizeArrayPrimIter< T >::end ( void   )  const [inline]

Definition at line 52 of file ResizeArrayPrimIter.h.

References ResizeArrayPrimIter< T >::array, ResizeArrayPrimIter< T >::currentIndex, and ResizeArray< Elem >::size().

Referenced by Patch::gbisP2Ready(), and Patch::gbisP3Ready().

00052                                            {
00053       ResizeArrayPrimIter<T> iter;
00054       iter.array = array;
00055       iter.currentIndex = array->size();
00056       return(iter);
00057     }

template<class T>
T& ResizeArrayPrimIter< T >::operator * ( void   )  const [inline]

Definition at line 78 of file ResizeArrayPrimIter.h.

00078                               {
00079       return array->operator[](currentIndex);
00080     }

template<class T>
int ResizeArrayPrimIter< T >::operator!= ( const ResizeArrayPrimIter< T > &  iter  )  const [inline]

Definition at line 59 of file ResizeArrayPrimIter.h.

References ResizeArrayPrimIter< T >::array, and ResizeArrayPrimIter< T >::currentIndex.

00059                                                               {
00060       return (iter.currentIndex != currentIndex || iter.array != array);
00061     }

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

Definition at line 72 of file ResizeArrayPrimIter.h.

00072                                            {
00073       ResizeArrayPrimIter<T> tmp(*this);
00074       currentIndex++;
00075       return (tmp);
00076     }

template<class T>
ResizeArrayPrimIter<T> ResizeArrayPrimIter< T >::operator++ ( void   )  [inline]

Definition at line 67 of file ResizeArrayPrimIter.h.

00067                                             {
00068       currentIndex++;
00069       return (*this);
00070     }

template<class T>
ResizeArrayPrimIter<T>& ResizeArrayPrimIter< T >::operator= ( const ResizeArrayPrimIter< T > &  iter  )  [inline]

Definition at line 37 of file ResizeArrayPrimIter.h.

References ResizeArrayPrimIter< T >::array, and ResizeArrayPrimIter< T >::currentIndex.

00037                                                                            {
00038       array = iter.array;
00039       currentIndex = iter.currentIndex;
00040       return (*this);
00041     }

template<class T>
int ResizeArrayPrimIter< T >::operator== ( const ResizeArrayPrimIter< T > &  iter  )  const [inline]

Definition at line 63 of file ResizeArrayPrimIter.h.

00063                                                               {
00064       return (!operator!=(iter));
00065     }


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 01:17:22 2017 for NAMD by  doxygen 1.4.7