NAME

OTC_MListModifier - Inherits from OTC_MListIterator to allow modification of items.

SYNOPSIS


#include <OTC/collctn/mlstmdfr.hh>

template<class T>
class OTC_MListModifier : public OTC_MListIterator<T>
{
  public:
    inline OTC_MListModifier(
      OTC_MList<T>& theList,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    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 inherits from OTC_MListIterator to allow modification of items held by an instance of OTC_MList. Items in the list can also be removed using the iterator. 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_MListModifier(
  OTC_MList<T>& theList,
  OTC_Protection theProtection=OTCLIB_SAFE
);

RETRIEVAL

inline T& item() const;

REMOVAL

inline void remove();

ADDITION

inline void addBefore(T const& theItem);
inline void addAfter(T const& theItem);

SEE ALSO

OTC_MListIterator

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED