Unicorn XML Toolkit
Version 1.00.00

Namespace Xpath
Class CNodeArray

class CNodeArray: public CInterface {
public:
    CNodeArray();
    virtual ~CNodeArray();
public:
    virtual void Add(const XNode &pNode) = 0;
    virtual int GetSize() = 0;
    virtual XNode GetAt(int nIndex) = 0;
    virtual bool Find(const XNode &pNode) = 0;
    virtual XNodeArrayIndex CreateIndex() = 0;
    };

The abstract interface to ordered arrays of XDM nodes.

Ordering is controlled by the separate object called data set (see description of the CDataSet class for details). It is assumed that nodes that belong to the same document tree are ordered according to their position in the document order defined by XPath. Nodes that belong to different document trees are ordered in some consistent way which is implementation dependent.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CNodeArrayIndex, Dom::INode
Constructor/Destructor Summary
CNodeArray ();
����������Constructs the node array.
~CNodeArray ();
����������Destroys the node array.

Function Summary
void Add (const XNode &pNode);
����������Adds the node to this node array.
int GetSize ();
����������Returns the number of nodes in this node array.
XNode GetAt (int nIndex);
����������Returns the node at the given index in this node array.
bool Find (const XNode &pNode);
����������Tests whether the given node is a member of this node array.
XNodeArrayIndex CreateIndex ();
����������Creates an index for this node array.

Constructor/Destructor Detail

CNodeArray

CNodeArray();

Constructs the node array.

~CNodeArray

virtual ~CNodeArray();

Destroys the node array.

Function Detail

Add

virtual void Add(const XNode &pNode) = 0;

Adds the node to this node array.

The actual position of the node in the array depends on the ordering controlled by the data set associated with this node array.

Parameters:
pNode - the node to add

GetSize

virtual int GetSize() = 0;

Returns the number of nodes in this node array.

Returns:
the number of nodes in this node array

GetAt

virtual XNode GetAt(int nIndex) = 0;

Returns the node at the given index in this node array.

Parameters:
nIndex - the zero-based index
Returns:
the node at the given index in this node array

Find

virtual bool Find(const XNode &pNode) = 0;

Tests whether the given node is a member of this node array.

Parameters:
pNode - the node to test
Returns:
true if the node is a member of this node array; false otherwise

CreateIndex

virtual XNodeArrayIndex CreateIndex() = 0;

Creates an index for this node array.

The index provides an interface for sequential enumeration of nodes in the node array. See description of the CNodeArrayIndex class for details.

Returns:
the newly created node array index

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.