Index

dkIterator

Purpose:

dkIterator is a base abstract class of iterators. It is used to iterate over collection members. dkIterator has subclasses that work for each collection type.

Class summary:

class dkIterator
{
public:
   dkIterator(const dkCollection& fromCollection);
   dkIterator(const dkIterator& fromIterator);
   virtual dkIterator();
 
   virtual DKAny* next() = 0;
   virtual void reset() = 0;
   virtual DKBoolean more() = 0;
   dkCollection& getCollection() const;
};

Members:

Member functions

next
Returns the current element in the collection, and advances the iterator to the next element.
 virtual DKAny* next() = 0;

reset
Resets the iterator to the beginning of the collection.
virtual void reset() = 0;

more
Returns TRUE if more elements are in the collection.
virtual DKBoolean more() = 0;

getCollection
Returns the associated collection.
 dkCollection& getCollection() const;

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.