Iterator#include </home/jenkins/.jenkins/ubuntu-remote-queue/jenkins-BuildZorbaUbuntu-462/source/zorba/swig/Iterator.h> Interface for an Iterator over an instance of the XML Data Model (i.e., 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.Note: Iterator is not a thread-safe class, i.e., none of its methods should ever be called by two or more threads in parallel.Friend Classes
Protected Attributes
Public Functions
Friend ClassesCollectionfriend class Collection
CollectionManagerfriend class CollectionManager
DocumentManagerfriend class DocumentManager
DynamicContextfriend class DynamicContext
ItemSequencefriend class ItemSequence
StaticContextfriend class StaticContext
XQueryfriend class XQuery
Protected AttributestheConsumedbool theConsumed
theItemzorba::Item theItem
theIteratorzorba::Iterator_t theIterator
Public Functionsclosevoid close() Stop iterating. The purpose of this method is to release resources that were allocated during open. After calling close(), neither close() nor next() may be called again. However, the iterator may be re-opened (by calling open()). Parameters
destroyvoid destroy() brief Destroy this iterator from memory
isOpenbool isOpen() brief Check whether the iterator is open or not
Iterator Iterator()
Iterator Iterator(const Iterator &anIterator)
Iterator Iterator(zorba::Iterator_t anIterator)
Iterator Iterator(zorba::Item &aItem)
nextbool next(Item &aItem) 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() 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
|