|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CDataSet: public CInterface { public: CDataSet(); virtual ~CDataSet(); public: virtual bool GetElementId( const XNode &pNode, CString &strId) = 0; virtual XNode GetElementById( const XDocument &pDocument, const CString &strId) = 0; virtual int GetRelativePosition( const XNode &pNode1, const XNode &pNode2) = 0; };
The abstract interface for handling element identifiers and comparing relative positions of nodes.
It is assumed that every application or library that employs
classes of the
Xpath
namespace will supply
the class derived from
CDataSet
to provide
the appropriate implementation of corresponding features.
Dom::INode, Dom::IDocument
Constructor/Destructor Summary | |
CDataSet
();
����������Constructs the data set. |
|
~CDataSet
();
����������Destroys the data set. |
Function Summary | |
bool
|
GetElementId
(const XNode &pNode, CString &strId);
����������Returns the identifier of the given element node. |
XNode
|
GetElementById
(const XDocument &pDocument, const CString &strId);
����������Looks up an element node having the given identifier in the given document. |
int
|
GetRelativePosition
(const XNode &pNode1, const XNode &pNode2);
����������Returns the relative position of two nodes according to the ordering specified by this data set. |
Constructor/Destructor Detail |
CDataSet();
Constructs the data set.
virtual ~CDataSet();
Destroys the data set.
Function Detail |
virtual bool GetElementId( const XNode &pNode, CString &strId) = 0;
Returns the identifier of the given element node.
pNode
- the element nodestrId
- on return, the value of the element identifier;
unspecified, if the element has no identifiertrue
if the given element has
an identifier;
false
otherwisevirtual XNode GetElementById( const XDocument &pDocument, const CString &strId) = 0;
Looks up an element node having the given identifier in the given document.
pDocument
- the document nodestrId
- the element identifier to look upNULL
is there is no such
elementvirtual int GetRelativePosition( const XNode &pNode1, const XNode &pNode2) = 0;
Returns the relative position of two nodes according to the ordering specified by this data set.
The data set defines global order for all nodes of all open documents in the data set. Within every single document this global order is equivalent to the document order defined by XPath.
The relative position of two nodes is a negative integer if the first node precedes the second node, a positive integer if the first node follows the second node, and zero if two nodes are equal.
pNode1
- the first nodepNode2
- the second node
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |