NAME

OTC_MListIterator - Iterator over an OTC_MList. No modification allowed.

SYNOPSIS


#include <OTC/collctn/mlstiter.hh>

template<class T>
class OTC_MListIterator
{
  public:
    inline OTC_MListIterator(
      OTC_MList<T> const& theList,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    inline void prev();
    inline void next();
    inline void resetFirst();
    inline void resetLast();
    inline T const& item() const;
    inline OTC_Boolean isValid() const;
  protected:
    inline T& _item() const;
    inline void _remove();
    inline void _addBefore(T const& theItem);
    inline void _addAfter(T const& theItem);
};

CLASS TYPE

Concrete

DESCRIPTION

This class is an iterator specifically for the OTC_MList class. Modification of items through the iterator is not permitted. If modification of items held by an instance of OTC_MList, through an iterator is required, the OTC_MListModifier class should be used. This iterator can be moved both forward and backwards. The life of the iterator, cannot extend beyond the life of the list being iterated over.

INITIALISATION

inline OTC_MListIterator(
  OTC_MList<T> const& theList,
  OTC_Protection theProtection=OTCLIB_SAFE
);

MOVEMENT

inline void prev();
inline void next();
inline void resetFirst();
inline void resetLast();

RETRIEVAL

inline T const& item() const;
inline OTC_Boolean isValid() const;

SEE ALSO

OTC_MListModifier

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED