zorba::Collection Class Reference

A Collection is a sequence of Node Items. More...

#include <zorba/collection.h>

Inheritance diagram for zorba::Collection:

zorba::SmartObject

List of all members.

Public Member Functions

virtual bool addDocument (std::istream &aInStream)=0
 Adds the document retrieved from the given input stream to the Collection.
virtual bool addNode (const Item &aNode)=0
 Adds a Node Item to the Collection.
virtual bool addNodes (const ResultIterator *aResultIterator)=0
 Adds the Node Items retrieved from the given ResultIterator to the Collection.
void addReference () const
virtual bool deleteNode (const Item &aNode)=0
 Deletes the given Item from the Collection.
virtual void free ()
long getRefCount () const
virtual Item getUri ()=0
 Get the URI of a collection as an anyURI Item.
void removeReference ()
virtual ~Collection ()
 Destructor.

Protected Attributes

unsigned int theRefCount


Detailed Description

A Collection is a sequence of Node Items.

Each Collection is created by the XmlDataManager and referenced by a URI. The URI can be accessed in a query's fn:collection function.

Note: This class is reference counted. When writing multi-threaded clients, it is the responibility of the client code to synchronize assignments to the SmartPtr holding this object.

Definition at line 34 of file collection.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 39 of file collection.h.


Member Function Documentation

virtual bool zorba::Collection::addDocument ( std::istream &  aInStream  )  [pure virtual]

Adds the document retrieved from the given input stream to the Collection.

Parameters:
aInStream the input stream from which to parse the document.
Returns:
true if the document was added to the collection (e.g. was a valid document), false otherwise.

virtual bool zorba::Collection::addNode ( const Item aNode  )  [pure virtual]

Adds a Node Item to the Collection.

Parameters:
aNode the Node Item to add.
Returns:
true if the Node Item was added to the Collection, false otherwise.

virtual bool zorba::Collection::addNodes ( const ResultIterator aResultIterator  )  [pure virtual]

Adds the Node Items retrieved from the given ResultIterator to the Collection.

Parameters:
aResultIterator the ResultIterator that produces the Node Items to add.
Returns:
true if all the Node Items of the given ResultIterator were added to the Collection, false otherwise.

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

Definition at line 39 of file smart_ptr.h.

virtual bool zorba::Collection::deleteNode ( const Item aNode  )  [pure virtual]

Deletes the given Item from the Collection.

Parameters:
aNode the Node Item to delete
Returns:
true if the given Node Item was deleted, false otherwise.

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 Item zorba::Collection::getUri (  )  [pure virtual]

Get the URI of a collection as an anyURI Item.

Returns:
Item the anyURI Item of the Collection.

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: