Unicorn XML Toolkit
Version 1.00.00

Namespace Xpath
Class CNodeTest

class CNodeTest: public CInterface {
public:
    enum {
        wildcard,
        namespaceWildcard,
        name,
        comment,
        text,
        processingInstruction,
        processingInstructionTarget,
        node
        };
public:
    CNodeTest();
    virtual ~CNodeTest();
public:
    virtual int GetType() = 0;
    virtual bool Evaluate(
        const XContext &pContext, const XNode &pNode) = 0;
    virtual CString GetLocalName();
    };

The abstract interface to XPath node tests.

Every node test object is assigned a certain type. Allowed type codes are specified using the anonymous enumeration in the declaration of this class.

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

Function Summary
int GetType ();
����������Returns the type of this node test.
bool Evaluate (const XContext &pContext, const XNode &pNode);
����������Evaluates this node test for the given node in the given context.
CString GetLocalName ();
����������Returns the local name associated with this node test.

Constructor/Destructor Detail

CNodeTest

CNodeTest();

Constructs the node test.

~CNodeTest

virtual ~CNodeTest();

Destroys the node test.

Function Detail

GetType

virtual int GetType() = 0;

Returns the type of this node test.

Returns:
the type of this node test

Evaluate

virtual bool Evaluate(
    const XContext &pContext, const XNode &pNode) = 0;

Evaluates this node test for the given node in the given context.

Parameters:
pContext - the evaluation context
pNode - the node to which this node test is to be applied
Returns:
true if this node test is satisfied for the given node in the given context; false otherwise

GetLocalName

virtual CString GetLocalName();

Returns the local name associated with this node test.

Returns:
the local name associated with this node test, if the node test has type CNodeTest::name ; the empty string otherwise

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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