VIPER REFERENCE MANUAL


NAME
iflListIterRev - backward iterator for iflList

INHERITS FROM
iflMultiListIterRev

HEADER FILE
#include <ifl/iflList.h>

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

INHERITED PUBLIC METHODS

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

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

   Using iflListIterRev
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 backward through the items from the tail to the head by doing:
    iflListIterRev<someItem> iter(list);
    someItem* item;
    while (item = iter.next()) {
        // do something with item (and possibly unlink/delete it)
    }

METHOD DESCRIPTIONS

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

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

SEE ALSO
iflList, iflMultiListIterRev