Unicorn XML Toolkit
Version 1.00.00

Namespace Xpath
Class CContext

class CContext: public CInterface {
public:
    CContext(
        const XIterator &pIterator,
        const XVariableBindingSet &pVariableBindingSet,
        const XFunctionLibrary &pFunctionLibrary,
        const XNamespaceDeclarationSet &pNamespaceDeclarationSet,
        const XDataSet &pDataSet,
        const XXpathImplementation &pXpathImplementation);
    CContext(
        const XContext &pContext,
        const XIterator &pIterator);
    CContext(
        const XContext &pContext,
        const XNode &pNode);
    ~CContext();
public:
    XNode GetNode() const;
    int GetPosition() const;
    int GetSize() const;
    XVariableBindingSet GetVariableBindingSet() const;
    XFunctionLibrary GetFunctionLibrary() const;
    XNamespaceDeclarationSet GetNamespaceDeclarationSet() const;
    XDataSet GetDataSet() const;
    XXpathImplementation GetXpathImplementation() const;
    };

The XPath evaluation context.

Every object of this class is associated with certain node-set iterator. The current node of the iterator specifies the context node, the current position of the itertor specifies the context position and the number of nodes in the corresponding node-set specifies the context size.

In addition to attributes of the expession context specified by XPath, every CContext object is associated with certain data set object and XPath implementation object.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CIterator, CVariableBindingSet, CFunctionLibrary, CNamespaceDeclarationSet, CDataSet, CXpathImplementation, Dom::INode
Constructor/Destructor Summary
CContext (const XIterator &pIterator, const XVariableBindingSet &pVariableBindingSet, const XFunctionLibrary &pFunctionLibrary, const XNamespaceDeclarationSet &pNamespaceDeclarationSet, const XDataSet &pDataSet, const XXpathImplementation &pXpathImplementation);
����������Constructs the top-level evaluation context.
CContext (const XContext &pContext, const XIterator &pIterator);
����������Constructs the evaluation context from a parent context and a node-set iterator.
CContext (const XContext &pContext, const XNode &pNode);
����������Constructs the evaluation context from a parent context and a node.
~CContext ();
����������Destroys the evaluation context.

Function Summary
XNode GetNode ();
����������Returns the context node of this context.
int GetPosition ();
����������Returns the context position of this context.
int GetSize ();
����������Returns the context size of this context.
XVariableBindingSet GetVariableBindingSet ();
����������Returns the variable binding set of this context.
XFunctionLibrary GetFunctionLibrary ();
����������Returns the function library of this context.
XNamespaceDeclarationSet GetNamespaceDeclarationSet ();
����������Returns the namespace declaration set of this context.
XDataSet GetDataSet ();
����������Returns the data set object associated with this context.
XXpathImplementation GetXpathImplementation ();
����������Returns the XPath implementation object associated with this context.

Constructor/Destructor Detail

CContext

CContext(
    const XIterator &pIterator,
    const XVariableBindingSet &pVariableBindingSet,
    const XFunctionLibrary &pFunctionLibrary,
    const XNamespaceDeclarationSet &pNamespaceDeclarationSet,
    const XDataSet &pDataSet,
    const XXpathImplementation &pXpathImplementation);

Constructs the top-level evaluation context.

This constructor creates the context supplied by the application when the outermost XPath expression is evaluated.

Parameters:
pIterator - the node-set iterator which specifies the context node, context position and context size
pVariableBindingSet - the set of variable bindings for this context
pFunctionLibrary - the function library for this context
pNamespaceDeclarationSet - the set of namespace declarations for this context
pDataSet - the data set object to be associated with this context
pDataSet - the XPath implementation object to be associated with this context

CContext

CContext(
    const XContext &pContext,
    const XIterator &pIterator);

Constructs the evaluation context from a parent context and a node-set iterator.

This constructor creates the context derived from another, already existing parent context. The context node, context position and context size of the constructed context are supplied by the node-set iterator; all other context properties are inherited from the parent context.

Parameters:
pContext - the parent context
pIterator - the node-set iterator used to supply the context node, context position and context size of this context

CContext

CContext(
    const XContext &pContext,
    const XNode &pNode);

Constructs the evaluation context from a parent context and a node.

This constructor creates the context derived from another, already existing parent context. The context node of the constructed context is supplied as the parameter to the constructor; the context position and context size of the constructed context are set to 1 . All other context properties are inherited from the parent context.

~CContext

~CContext();

Destroys the evaluation context.

Function Detail

GetNode

XNode GetNode();

Returns the context node of this context.

Returns:
the context node of this context

GetPosition

int GetPosition();

Returns the context position of this context.

Returns:
the context position of this context

GetSize

int GetSize();

Returns the context size of this context.

Returns:
the context size of this context

GetVariableBindingSet

XVariableBindingSet GetVariableBindingSet();

Returns the variable binding set of this context.

Returns:
the variable binding set of this context

GetFunctionLibrary

XFunctionLibrary GetFunctionLibrary();

Returns the function library of this context.

Returns:
the function library of this context

GetNamespaceDeclarationSet

XNamespaceDeclarationSet GetNamespaceDeclarationSet();

Returns the namespace declaration set of this context.

Returns:
the namespace declaration set of this context

GetDataSet

XDataSet GetDataSet();

Returns the data set object associated with this context.

Returns:
the data set object associated with this context

GetXpathImplementation

XXpathImplementation GetXpathImplementation();

Returns the XPath implementation object associated with this context.

Returns:
the XPath implementation object associated with this context

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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