A Collection is a persistent sequence of node items. More...
Public Member Functions | |
Collection (const Collection &aMgr) | |
Collection (zorba::Collection *aMgr) | |
ItemSequence | contents () |
This function returns the sequence of nodes of the collection. More... | |
void | deleteNodeFirst () |
This function deletes the first node from a collection. More... | |
void | deleteNodeLast () |
This function deletes the last node from a collection. More... | |
void | deleteNodes (const ItemSequence &aNodes) |
This function deletes zero of more nodes from a collection. More... | |
void | deleteNodesFirst (unsigned long aNumNodes) |
This function deletes the n first nodes from a collection. More... | |
void | deleteNodesLast (unsigned long aNumNodes) |
This function deletes the n last nodes from a collection. More... | |
Item | getName () |
Get the name of the collection. More... | |
TypeIdentifier | getType () |
Retrieves the sequence type for this (static declared) collection. More... | |
long long | indexOf (const Item &aNode) |
This function returns the index of the given node in the collection. More... | |
void | insertNodesAfter (const Item &aTarget, const ItemSequence &aNodes) |
This function inserts copies of the given nodes into a collection at the position directly following the given target node. More... | |
void | insertNodesBefore (const Item &aTarget, const ItemSequence &aNodes) |
This function inserts copies of the given nodes into a collection at the position directly preceding the given target node. More... | |
void | insertNodesFirst (const ItemSequence &aNodes) |
This function inserts copies of the given nodes at the beginning of the collection. More... | |
void | insertNodesLast (const ItemSequence &aNodes) |
This function inserts copies of the given nodes at the end of the collection. More... | |
bool | isStatic () |
The function checks if this collection has been statically declared. More... | |
A Collection is a persistent sequence of node items.
Instances of this class can be used to modify or retrieve the contents of a collection.
The variable aNodes passed to any of the insert functions is evaluated as though it were an enclosed expression in an element constructor. The result of this step is a sequence of nodes to be inserted into the collection.
Definition at line 29 of file Collection.h.
|
inline |
Definition at line 35 of file Collection.h.
|
inline |
Definition at line 36 of file Collection.h.
ItemSequence Collection::contents | ( | ) |
This function returns the sequence of nodes of the collection.
void Collection::deleteNodeFirst | ( | ) |
This function deletes the first node from a collection.
XDDY0011 | if the collection doesn't contain any node. |
void Collection::deleteNodeLast | ( | ) |
This function deletes the last node from a collection.
XDDY0011 | if the collection doesn't contain any node. |
void Collection::deleteNodes | ( | const ItemSequence & | aNodes) |
This function deletes zero of more nodes from a collection.
aNodes | the nodes in the collection that should be deleted. |
XDDY0011 | if any nodes in the given sequence is not a member of a collection or not all nodes of the sequence belong to the same collection. |
void Collection::deleteNodesFirst | ( | unsigned long | aNumNodes) |
This function deletes the n first nodes from a collection.
XDDY0011 | if the collection doesn't contain any node. |
void Collection::deleteNodesLast | ( | unsigned long | aNumNodes) |
This function deletes the n last nodes from a collection.
XDDY0011 | if the collection doesn't contain any node. |
Item Collection::getName | ( | ) |
Get the name of the collection.
TypeIdentifier Collection::getType | ( | ) |
Retrieves the sequence type for this (static declared) collection.
long long Collection::indexOf | ( | const Item & | aNode) |
This function returns the index of the given node in the collection.
aNode | The node to retrieve the index from. |
XDDY0011 | if node is not contained in any collection. |
void Collection::insertNodesAfter | ( | const Item & | aTarget, |
const ItemSequence & | aNodes | ||
) |
This function inserts copies of the given nodes into a collection at the position directly following the given target node.
aTarget | the node in the collection after which the sequence should be inserted. |
aNodes | The sequences of nodes whose copies should be added to the collection. |
XDDY0011 | if any nodes in the sequence is not a member of a collection or not all nodes of the sequence belong to the same collection. |
void Collection::insertNodesBefore | ( | const Item & | aTarget, |
const ItemSequence & | aNodes | ||
) |
This function inserts copies of the given nodes into a collection at the position directly preceding the given target node.
aTarget | the node in the collection before which the sequence should be inserted. |
aNodes | The sequences of nodes whose copies should be added to the collection. |
XDDY0011 | if any nodes in the sequence is not a member of a collection or not all nodes of the sequence belong to the same collection. |
void Collection::insertNodesFirst | ( | const ItemSequence & | aNodes) |
This function inserts copies of the given nodes at the beginning of the collection.
aNodes | The sequences of nodes whose copies should be added to the collection. |
void Collection::insertNodesLast | ( | const ItemSequence & | aNodes) |
This function inserts copies of the given nodes at the end of the collection.
aNodes | The sequences of nodes whose copies should be added to the collection. |
bool Collection::isStatic | ( | ) |
The function checks if this collection has been statically declared.