zorba::ResultIterator Class Reference

A ResultIterator can be used to iterator over the result sequence of a query. More...

#include <zorba/result_iterator.h>

Inheritance diagram for zorba::ResultIterator:

zorba::Iterator zorba::ItemSequence

List of all members.

Public Member Functions

virtual void close ()=0
 Stop iterating.
virtual bool next (Item &aItem)=0
 Get the next Item of the result sequence.
virtual void open ()=0
 Start iterating.
virtual ~ResultIterator ()
 Destructor.


Detailed Description

A ResultIterator can be used to iterator over the result sequence of a query.

A ResultIterator is created by calling XQuery::iterator() on a compiled XQuery.

Definition at line 28 of file result_iterator.h.


Constructor & Destructor Documentation

virtual zorba::ResultIterator::~ResultIterator (  )  [inline, virtual]

Destructor.

Definition at line 34 of file result_iterator.h.


Member Function Documentation

virtual void zorba::ResultIterator::close (  )  [pure virtual]

Stop iterating.

In order to call ResultIterator::next, open has to been called.

Implements zorba::Iterator.

virtual bool zorba::ResultIterator::next ( Item aItem  )  [pure virtual]

Get the next Item of the result sequence.

Parameters:
aItem the next Item of the result sequence if true is returned by the function.
Returns:
true if the sequence is not exhausted, false otherwise.
Exceptions:
ZorbaException if an error occured during query execution or the ResultIterator has not been opened..

Implements zorba::Iterator.

virtual void zorba::ResultIterator::open (  )  [pure virtual]

Start iterating.

This function needs to be called before calling next.

Exceptions:
ZorbaException if an error occurs.

Implements zorba::Iterator.


The documentation for this class was generated from the following file: