NAME

OTC_BucketCursor - Iterator over items held in OTC_Bucket.

SYNOPSIS


#include <OTC/collctn/buckcurs.hh>

template<class T>
class OTC_BucketCursor : public OTC_Cursor<T>
{
  public:
    static os_typespec* get_os_typespec();
    ~OTC_BucketCursor();
    OTC_BucketCursor(
      OTC_LinkList* aList,
      OTC_Direction theDirection=OTCLIB_FORWARD,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    OTC_BucketCursor(
      OTC_LinkList* aList,
      OTC_Linkable* theStart,
      OTC_Linkable* theEnd,
      OTC_Direction theDirection=OTCLIB_FORWARD,
      OTC_Protection theProtection=OTCLIB_SAFE
    );
    OTC_BucketCursor(OTC_BucketCursor<T> const& aIter);
    void reset();
    void next();
    T& item();
    OTC_Boolean isValid() const;
    OTC_Cursor<T>* clone();
    inline OTC_Direction direction() const;
    void reverse();
};

CLASS TYPE

Concrete

DESCRIPTION

Derived version of OTC_Cursor, which iterates over the items in an instance of OTC_LinkList, where the derived type of link is OTC_Bucket. This class should no longer be used. Instead the OTC_ItemCursor class should be used. The OTC_BucketCursor class will be removed in OSE 4.0.

INITIALISATION

OTC_BucketCursor(
  OTC_LinkList* aList,
  OTC_Direction theDirection=OTCLIB_FORWARD,
  OTC_Protection theProtection=OTCLIB_SAFE
);
OTC_BucketCursor(
  OTC_LinkList* aList,
  OTC_Linkable* theStart,
  OTC_Linkable* theEnd,
  OTC_Direction theDirection=OTCLIB_FORWARD,
  OTC_Protection theProtection=OTCLIB_SAFE
);
OTC_BucketCursor(OTC_BucketCursor<T> const& aIter);

MOVEMENT

Following operations allow movement of the iterator over the list.
void reset();
void next();

RETRIEVAL

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

CLONING

OTC_Cursor<T>* clone();

DIRECTION

inline OTC_Direction direction() const;
void reverse();

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 1992 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED