zorba::SingletonItemSequence

#include <zorba/singleton_item_sequence.h>

Inherited from: zorba::ItemSequence

This class is an implementation of ItemSequence. Objects of this class represent a sequence with exactly one item.See ItemSequence

Protected Attributes

Item

theItem

unsigned int

theRefCount

Public Functions

void

addReference() const

void

free()

Iterator_t

getIterator()

Create an iterator over the items of this sequence.

long

getRefCount() const

void

removeReference()

SingletonItemSequence(const Item &aItem)

~SingletonItemSequence()

Protected Attributes

theItem

Item theItem

theRefCount

unsigned int theRefCount

Public Functions

addReference

void addReference() const

free

void free()

getIterator

Iterator_t getIterator()

Create an iterator over the items of this sequence.

The life time of the iterator shouldnot exceed the life time of this item sequence.

Returns

an iterator over the items

Parameters

Throws zerr::ZAPI0039 if the implementation of the associated ItemSequence does not allow more than one iterator to be created.

getRefCount

long getRefCount() const

removeReference

void removeReference()

SingletonItemSequence

 SingletonItemSequence(const Item &aItem)

Parameters

aItem the single item of the sequence

~SingletonItemSequence

 ~SingletonItemSequence()