25
35
Collection(const Collection& aMgr) : theCollection(aMgr.theCollection) {}
26
36
Collection(zorba::Collection* aMgr) : theCollection(aMgr) {}
39
* This function returns the sequence of nodes of the collection.
41
* @return The sequence contained in the given collection.
28
44
ItemSequence contents();
47
* This function deletes the first node from a collection.
49
* @throw XDDY0011 if the collection doesn't contain any node.
29
52
void deleteNodeFirst();
55
* This function deletes the last node from a collection.
57
* @throw XDDY0011 if the collection doesn't contain any node.
30
60
void deleteNodeLast();
63
* This function deletes zero of more nodes from a collection.
65
* @param aNodes the nodes in the collection that should be deleted.
67
* @throw XDDY0011 if any nodes in the given sequence is not a member of a collection
68
* or not all nodes of the sequence belong to the same collection.
31
71
void deleteNodes(const ItemSequence &aNodes );
74
* This function deletes the n first nodes from a collection.
76
* @throw XDDY0011 if the collection doesn't contain any node.
32
79
void deleteNodesFirst(unsigned long aNumNodes );
82
* This function deletes the n last nodes from a collection.
84
* @throw XDDY0011 if the collection doesn't contain any node.
33
87
void deleteNodesLast(unsigned long aNumNodes );
34
//std::vector< Annotation > getAnnotations():
90
* \brief Get the name of the collection.
92
* @return The name of the collection.
97
* Retrieves the sequence type for this (static declared) collection.
99
* @return the sequence type for the said collection, or 0
100
* if this collection is not statically declared.
36
104
TypeIdentifier getType();
107
* This function returns the index of the given node in the collection.
109
* @param aNode The node to retrieve the index from.
111
* @return Returns the position of the given node in the collection.
113
* @throw XDDY0011 if node is not contained in any collection.
37
116
long long indexOf(const Item &aNode );
119
* This function inserts copies of the given
120
* nodes into a collection at the position directly following the
123
* @param aTarget the node in the collection after which the
124
* sequence should be inserted.
125
* @param aNodes The sequences of nodes whose copies should
126
* be added to the collection.
128
* @throw XDDY0011 if any nodes in the sequence is not a member of a collection
129
* or not all nodes of the sequence belong to the same collection.
38
132
void insertNodesAfter(const Item &aTarget, const ItemSequence &aNodes );
135
* This function inserts copies of the given
136
* nodes into a collection at the position directly preceding the
139
* @param aTarget the node in the collection before which the
140
* sequence should be inserted.
141
* @param aNodes The sequences of nodes whose copies should
142
* be added to the collection.
144
* @throw XDDY0011 if any nodes in the sequence is not a member of a collection
145
* or not all nodes of the sequence belong to the same collection.
39
148
void insertNodesBefore(const Item &aTarget, const ItemSequence &aNodes );
151
* This function inserts copies of the
152
* given nodes at the beginning of the collection.
154
* @param aNodes The sequences of nodes whose copies
155
* should be added to the collection.
40
158
void insertNodesFirst(const ItemSequence &aNodes );
161
* This function inserts copies of the
162
* given nodes at the end of the collection.
164
* @param aNodes The sequences of nodes whose copies
165
* should be added to the collection.
41
168
void insertNodesLast(const ItemSequence &aNodes );
171
* The function checks if this collection has been statically declared.
173
* @return true if the collection is a static collection, false otherwise.
43
177
//void registerDiagnosticHandler(DiagnosticHandler *aDiagnosticHandler );