VIPER REFERENCE MANUAL


NAME
iflListIter - forward iterator for iflList

INHERITS FROM
iflMultiListIter

HEADER FILE
#include <ifl/iflList.h>

PUBLIC METHOD SUMMARY
template<class itemType> iflListIter ( const iflList<itemType>* list);
template<class itemType> iflListIter ( const iflList<itemType>& list);

INHERITED PUBLIC METHODS

   Inherited from iflMultiListIter
itemType* curr (  ) const;
itemType* next (  );
void reset (  );

CLASS DESCRIPTION
iflListIter provides a lightweight iterator for doubly-linked lists derived from iflList.

   Using iflListIter
Say you have built a list of some sort of item:
    iflList<someItem> list;
    for (int i = 0; i < 10; i++) 
        list.append(new someItem(i));
You can iterate through the items from the head to the tail by doing:
    iflListIter<someItem> iter(list);
    someItem* item;
    while (item = iter.next()) {
        // do something with item (and possibly unlink/delete it)
    }
You can interate backwards using iflListIterRev

METHOD DESCRIPTIONS

   iflListIter()
template<class itemType> iflListIter ( const iflList<itemType>* list);
template<class itemType> iflListIter ( const iflList<itemType>& list);

Constructs a forward (head to tail) iterator from a pointer or reference to an iflList, given by list.

SEE ALSO
iflList, iflListIterRev, iflMultiListIter