> The XQuery Processor
#include <zorba/collection.h>


Public Member Functions | |
| virtual bool | addDocument (std::istream &aInStream, const long aPosition=-1)=0 |
| Adds the document retrieved from the given input stream to the Collection. | |
| virtual bool | addNode (const Item &aNode, const Item &aTargetNode, bool aOrder)=0 |
| Adds a Node Item to the Collection after the targetNode. | |
| virtual bool | addNode (const Item &aNode, const long aPosition=-1)=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 long aPosition=-1)=0 |
| Deletes the Item at the given position from the Collection. | |
| virtual bool | deleteNode (const Item &aNode)=0 |
| Deletes the given Item from the Collection. | |
| virtual void | free () |
| long | getRefCount () const |
| virtual Item | getUri () const =0 |
| Get the URI of a collection as an anyURI Item. | |
| virtual Item | nodeAt (const long aPosition)=0 |
| Get the node at the given position in the collection as a Node Item. | |
| void | removeReference () |
| virtual unsigned long | size () const =0 |
| Returns the number of items in the collection. | |
| virtual | ~Collection () |
| Destructor. | |
Protected Attributes | |
| unsigned int | theRefCount |
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.
| virtual zorba::Collection::~Collection | ( | ) | [inline, virtual] |
| virtual bool zorba::Collection::addDocument | ( | std::istream & | aInStream, | |
| const long | aPosition = -1 | |||
| ) | [pure virtual] |
Adds the document retrieved from the given input stream to the Collection.
| aInStream | the input stream from which to parse the document. | |
| aPosition | the position where the node will be inserted. By default the data will be appended at the end. |
| virtual bool zorba::Collection::addNode | ( | const Item & | aNode, | |
| const Item & | aTargetNode, | |||
| bool | aOrder | |||
| ) | [pure virtual] |
Adds a Node Item to the Collection after the targetNode.
| aNode | the Node Item to add. | |
| aTargetNode | the aNode will be added before the aTargetNode. | |
| sOrder | if true the aNode will be inserted before the aTarget. Otherwise aNode will be inserted after aTarget. |
| virtual bool zorba::Collection::addNode | ( | const Item & | aNode, | |
| const long | aPosition = -1 | |||
| ) | [pure virtual] |
Adds a Node Item to the Collection.
| aNode | the Node Item to add. | |
| aPosition | the position where the node will be inserted. By default the data will be appended at the end. |
| virtual bool zorba::Collection::addNodes | ( | const ResultIterator * | aResultIterator | ) | [pure virtual] |
Adds the Node Items retrieved from the given ResultIterator to the Collection.
| aResultIterator | the ResultIterator that produces the Node Items to add. |
| void zorba::SmartObject::addReference | ( | ) | const [inline, inherited] |
Definition at line 39 of file smart_ptr.h.
| virtual bool zorba::Collection::deleteNode | ( | const long | aPosition = -1 |
) | [pure virtual] |
Deletes the Item at the given position from the Collection.
| aPosition | the position of the Node that will be removed from collection. By default the last Node will be removed from collection. |
| virtual bool zorba::Collection::deleteNode | ( | const Item & | aNode | ) | [pure virtual] |
Deletes the given Item from the Collection.
| aNode | the Node Item to delete |
| 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 | ( | ) | const [pure virtual] |
| virtual Item zorba::Collection::nodeAt | ( | const long | aPosition | ) | [pure virtual] |
| void zorba::SmartObject::removeReference | ( | ) | [inline, inherited] |
Definition at line 41 of file smart_ptr.h.
| virtual unsigned long zorba::Collection::size | ( | ) | const [pure virtual] |
Returns the number of items in the collection.
unsigned int zorba::SmartObject::theRefCount [mutable, protected, inherited] |
Definition at line 26 of file smart_ptr.h.