Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CNodeId

class CNodeId {
public:
    CNodeId();
    CNodeId(const CNodeId &nodeId);
    CNodeId(int nDocumentId, int nNodeId);
    CNodeId(const XNode &pNode);
    ~CNodeId();
public:
    const CNodeId &operator=(const CNodeId &nodeId);
    void SetNull();
    bool IsNull() const;
    int GetDocumentId() const;
    int GetNodeId() const;
    int Compare(const CNodeId &nodeId) const;
    CString ToString() const;
    };

The unique identifier of an XML node.

Node identifiers contain two components. The first component uniquely identifies the node's owner document within an application; the second component uniquely identifies the node within its owner document. These components are obtained via calls to Dom::INode::GetDocumentId and Dom::INode::GetNodeId functions specified by the Extended Document Model (XDM).

The document identification component must be non-zero for every node. The zero document identification value is reserved for the null node identifier, which does not reference any node.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CNodeId ();
����������Constructs the null document identifier.
CNodeId (const CNodeId &nodeId);
����������Constructs the node identifier, copying another node identifier.
CNodeId (int nDocumentId, int nNodeId);
����������Constructs the node identifier with the specified components.
CNodeId (const XNode &pNode);
����������Constructs the node identifier for the specified node.
~CNodeId ();
����������Destroys the document identifier.

Function Summary
const�CNodeId�& operator= (const CNodeId &nodeId);
����������Assigns the specified node identifier to this node identifier.
void SetNull ();
����������Sets this node identifier to null.
bool IsNull () const;
����������Tests whether this node identifier is null.
int GetDocumentId () const;
����������Returns the document identification component of this node identifier.
int GetNodeId () const;
����������Returns the node identification component of this node identifier.
int Compare (const CNodeId &nodeId) const;
����������Compares this node identifier with another node identifier.
CString ToString () const;
����������Returns the string representation of this node identifier.

Constructor/Destructor Detail

CNodeId

CNodeId();

Constructs the null document identifier.

CNodeId

CNodeId(const CNodeId &nodeId);

Constructs the node identifier, copying another node identifier.

Parameters:
nodeId - the node identifier to copy

CNodeId

CNodeId(int nDocumentId, int nNodeId);

Constructs the node identifier with the specified components.

Parameters:
nDocumentId - the identification of a document within an application
nNodeId - the identification of a node within a document

CNodeId

CNodeId(const XNode &pNode);

Constructs the node identifier for the specified node.

Parameters:
pNode - the node

~CNodeId

~CNodeId();

Destroys the document identifier.

Function Detail

operator=

const CNodeId &operator=(const CNodeId &nodeId);

Assigns the specified node identifier to this node identifier.

Parameters:
nodeId - the node identifier to assign
Returns:
this node identifier

SetNull

void SetNull();

Sets this node identifier to null.

IsNull

bool IsNull() const;

Tests whether this node identifier is null.

Returns:
true if this node identifier is null; false otherwise

GetDocumentId

int GetDocumentId() const;

Returns the document identification component of this node identifier.

Returns:
the document identification component of this node identifier

GetNodeId

int GetNodeId() const;

Returns the node identification component of this node identifier.

Returns:
the node identification component of this node identifier

Compare

int Compare(const CNodeId &nodeId) const;

Compares this node identifier with another node identifier.

First the document identification components are compared. If the document identification of this node has the lower value, the result if a negative integer; if the document identification of this node has the higher value, the result is a positive integer.

If document identification components are equal, then node identification components are compared. If the node identification of this node has the lower value, the result if a negative integer; if the node identification of this node has the higher value, the result is a positive integer; otherwise node identificators are equal and the result is zero.

Parameters:
nodeId - the node identifier to compare with
Returns:
the result of comparison

ToString

CString ToString() const;

Returns the string representation of this node identifier.

Returns:
the string representation of this node identifier

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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