zorba::ResultIterator Class Reference

A ResultIterator can be used to compute and retrieve the result of an XQuery in a one-item-at-a-time fashion. More...

#include <zorba/result_iterator.h>

Inheritance diagram for zorba::ResultIterator:

zorba::Iterator zorba::ItemSequence zorba::SmartObject

List of all members.

Public Member Functions

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

Protected Attributes

unsigned int theRefCount


Detailed Description

A ResultIterator can be used to compute and retrieve the result of an XQuery in a one-item-at-a-time fashion.

Several ResultIterators can be created over the same compiled XQuery instance. However, given that the XQuery class is not thread-safe, the ResultIterators should not be operated upon by multiple threads.

Definition at line 32 of file result_iterator.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 37 of file result_iterator.h.


Member Function Documentation

void zorba::SmartObject::addReference (  )  const [inline, inherited]

Definition at line 39 of file smart_ptr.h.

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

Stop iterating.

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

Implements zorba::Iterator.

virtual void zorba::SmartObject::free (  )  [inline, virtual, inherited]

Definition at line 35 of file smart_ptr.h.

long zorba::SmartObject::getRefCount (  )  const [inline, inherited]

Definition at line 37 of file smart_ptr.h.

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.

void zorba::SmartObject::removeReference (  )  [inline, inherited]

Definition at line 41 of file smart_ptr.h.


Member Data Documentation

unsigned int zorba::SmartObject::theRefCount [mutable, protected, inherited]

Definition at line 26 of file smart_ptr.h.


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