zorba::Iterator#include <zorba/iterator.h> Inherited from: zorba::SmartObject Interface for an Iterator over a sequence of items. An iterator can be in one of the following two states: open or not-open. When in open state, only methods isOpen(), next() and close() may be called. When in not-open state, only isOpen() and open() may be called. The open() method changes the state from non-open to open, and the close() method changes the state from open to not-open.Public Functions
Protected Attributes
Public FunctionsaddReferencevoid addReference() const
closevoid close()=0 freevoid free()
getRefCountlong getRefCount() const
isOpenbool isOpen() const =0 brief Check whether the iterator is open or not
nextbool next(Item &aItem)=0 Get the next Item of the sequence.
Parameters
Returnsfalse if all the items of the sequence have been returned already by previous invocations of next(); true otherwise.Parameters
openvoid open()=0 Start iterating. This function needs to be called before calling next() or close(). Its purpose is to create and initialize any resources that may be needed during the iteration. It should not be called again until after close() has been called. Parameters
removeReferencevoid removeReference()
~Iterator ~Iterator() Destructor.
Protected AttributestheRefCountunsigned int theRefCount
|