Unicorn XML Toolkit
Version 1.00.00

Namespace Xpath
Class CNodeSet

class CNodeSet: public CInterface {
public:
    CNodeSet();
    virtual ~CNodeSet();
public:
    virtual bool InDocumentOrder() = 0;
    virtual bool InReverseDocumentOrder() = 0;
    virtual int GetSize() = 0;
    virtual XNode GetFirstNode() = 0;
    virtual XIterator CreateIterator() = 0;
    };

The abstract interface to XPath node-sets.

This class is also used to represent XPath node lists and sorted node sequences which do not need to obey a document order.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CIterator, Dom::INode
Constructor/Destructor Summary
CNodeSet ();
����������Constructs the node-set.
~CNodeSet ();
����������Destroys the node-set.

Function Summary
bool InDocumentOrder ();
����������Tests whether nodes in this node-set are sorted in the document order.
bool InReverseDocumentOrder ();
����������Tests whether nodes in this node-set are sorted in the reverse document order.
int GetSize ();
����������Returns the number of nodes in this node-set.
XNode GetFirstNode ();
����������Returns the first node of this node-set.
XIterator CreateIterator ();
����������Creates an iterator for this node-set.

Constructor/Destructor Detail

CNodeSet

CNodeSet();

Constructs the node-set.

~CNodeSet

virtual ~CNodeSet();

Destroys the node-set.

Function Detail

InDocumentOrder

virtual bool InDocumentOrder() = 0;

Tests whether nodes in this node-set are sorted in the document order.

Returns:
true if nodes of this node-set are sorted in the document order; false otherwise

InReverseDocumentOrder

virtual bool InReverseDocumentOrder() = 0;

Tests whether nodes in this node-set are sorted in the reverse document order.

Returns:
true if nodes of this node-set are sorted in the reverse document order; false otherwise

GetSize

virtual int GetSize() = 0;

Returns the number of nodes in this node-set.

Returns:
the number of nodes in this node-set

GetFirstNode

virtual XNode GetFirstNode() = 0;

Returns the first node of this node-set.

Returns:
the first node of this node-set; NULL if this node-set is empty

CreateIterator

virtual XIterator CreateIterator() = 0;

Creates an iterator for this node-set.

The iterator provides an interface for sequential enumeration of nodes in the node-set. See description of the CIterator class for details.

Returns:
the newly created iterator

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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