NAME

OTC_LinkCursor - Base class for cursors operating over a linked list.

SYNOPSIS


#include <OTC/collctn/linkcurs.hh>

class OTC_LinkCursor
{
  public:
    inline OTC_Direction direction() const;
    inline void reverse();
    inline void reset();
    inline void next();
    inline OTC_Boolean isValid() const;
  protected:
    virtual ~OTC_LinkCursor();
    OTC_LinkCursor(
      OTC_LinkList* theList,
      OTC_Direction theDirection,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    OTC_LinkCursor(
      OTC_LinkList* theList,
      OTC_Linkable* theStart,
      OTC_Linkable* theEnd,
      OTC_Direction theDirection,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    OTC_LinkCursor(OTC_LinkCursor const& theIter);
    inline OTC_Link* link() const;
};

CLASS TYPE

Abstract

DESCRIPTION

The OTC_LinkCursor class encapsulates most of the operations needed when implementing a cursor over an instance of OTC_LinkedList.

ITERATION

inline OTC_Direction direction() const;
inline void reverse();
inline void reset();
inline void next();
inline OTC_Boolean isValid() const;

INITIALISATION

OTC_LinkCursor(
  OTC_LinkList* theList,
  OTC_Direction theDirection,
  OTC_Protection theProtection=OTCLIB_SAFE
);
OTC_LinkCursor(
  OTC_LinkList* theList,
  OTC_Linkable* theStart,
  OTC_Linkable* theEnd,
  OTC_Direction theDirection,
  OTC_Protection theProtection=OTCLIB_SAFE
);
OTC_LinkCursor(OTC_LinkCursor const& theIter);

ACCESS TO LINK

inline OTC_Link* link() const;

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 TELSTRA CORPORATION LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED