MXmlEngXPathEvaluationContext Class Reference

#include <xml/dom/xmlengxpathevaluationcontext.h>

class MXmlEngXPathEvaluationContext
Public Member Functions
pure virtual voidAppendToResult(const TXmlEngNode)
pure virtual voidAppendToResult(const TXmlEngNamespace, const TXmlEngElement)
pure virtual voidAppendToResult(const RXmlEngNodeSet)
pure virtual TUint ArgCount()
pure virtual const RXmlEngXPathResultArgument(TUint)
pure virtual void *ExtendedContext()
pure virtual voidInitializeNodeSetResult()
pure virtual const RXmlEngXPathResultResult()
pure virtual voidSetResult(TReal)
pure virtual voidSetResult(TBool)
pure virtual voidSetResultL(const TDesC8 &)

Detailed Description

Provides the XPath evaluation context interface. An object of this type provides the argument values to an extension function to be evalutated and stores the result of evalutation.

See also: MXmlEngXPathExtensionFunction MXmlEngXPathExtensionFunction::Evaluate()

Objects of this type are not registered with the XPath library and must be destroyed by their owner.

Any memory allocated by this object must be freed when the object is destroyed.

Member Function Documentation

AppendToResult ( const TXmlEngNode )

voidAppendToResult(const TXmlEngNodeaNode)[pure virtual]

Appends a node to the node set result. InitializeNodeSetResult() should be called prior to the first call to an AppendToResult() method.

This method will return and do nothing if a previous OOM condition in the underlying libxml2 library has not been cleared. See libxml2_modules.h.

Pre-condition
OOM_FLAG==0, otherwise method returns and does nothing.
Parameters
aNodeNode to be added

AppendToResult ( const TXmlEngNamespace, const TXmlEngElement )

voidAppendToResult(const TXmlEngNamespaceaAppendedNsNode,
const TXmlEngElementaNsParentNode
)[pure virtual]

Appends a namespace node to the node set result. InitializeNodeSetResult() should be called prior to the first call to an AppendToResult() method.

A namespace node is the representation of an existing namespace declaration within an element node. This function cannot be used to add a new namespace declaration, rather it adds an existing namespace declaration attached to aNsParentNode.

See also: TXmlEngNamespace

This method will return and do nothing if a previous OOM condition in the underlying libxml2 library has not been cleared. See libxml2_modules.h.

Pre-condition
OOM_FLAG==0, otherwise method returns and does nothing.
Parameters
aAppendedNsNodeA namspace node to add to the node set result.
aNsParentNodeAn element node that holds the namespace declaration represented by aAppendedNsNode.

AppendToResult ( const RXmlEngNodeSet )

voidAppendToResult(const RXmlEngNodeSetaNodeSet)[pure virtual]

Appends a node set to the node set result. Nodes are merged into a resulting node set. InitializeNodeSetResult() should be called prior to the first call to an AppendToResult() method.

This method will return and do nothing if a previous OOM condition in the underlying libxml2 library has not been cleared. See libxml2_modules.h.

Pre-condition
OOM_FLAG==0, otherwise method returns and does nothing.
Parameters
aNodeSetThe node set to be appended

ArgCount ( )

TUint ArgCount()[pure virtual]

Gets the number of arguments provided.

Return Value
The number of arguments provided

Argument ( TUint )

const RXmlEngXPathResultArgument(TUintaIndex)[pure virtual]
Gets an argument by index. Does not transfer ownership. Index starts at 0.
Pre-condition
0 <= aIndex < ArgCount(). Function panics if precondition not met.
Return Value
The n-th argument of the function

ExtendedContext ( )

void *ExtendedContext()[pure virtual]

Gets the data specified in RXmlEngXPathExpression::SetExtendedContext() for the expression currently being evaluated.

InitializeNodeSetResult ( )

voidInitializeNodeSetResult()[pure virtual]

Sets the type of result to node set and initializes a new node set. Any existing result node set is replaced.

See also: AppendToResult(const TXmlEngNode) AppendToResult(const RXmlEngNodeSet) AppendToResult(const TXmlEngNamespace, const TXmlEngElement)

Result ( )

const RXmlEngXPathResultResult()[pure virtual]

Gets the result written so far. The result is undefined before SetResult(), InitializeNodeSetResult() or AppendToResult() have been called.

Pre-condition
SetResult() or InitializeNodeSetResult() and AppendToResult() have been previously called.
Return Value
The result evaluated by the function so far.

SetResult ( TReal )

voidSetResult(TRealaNumber)[pure virtual]

Sets the type of result to floating point number and stores the number as the result.

Parameters
aNumberThe number to store as the result

SetResult ( TBool )

voidSetResult(TBoolaBoolean)[pure virtual]

Sets the type of result to boolean and stores the value as the result.

Parameters
aBooleanThe value to store as the result

SetResultL ( const TDesC8 & )

voidSetResultL(const TDesC8 &aString)[pure virtual]

Sets the type of result to string and stores the string as the result.

Parameters
aStringThe string to store as the result