MXmlEngXPathEvaluationContext Class Reference

class MXmlEngXPathEvaluationContext

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.

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 Functions 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

const TXmlEngNode 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.

TXmlEngNamespaceThis 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

const TXmlEngNamespace aAppendedNsNodeA namspace node to add to the node set result.
const TXmlEngElement 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

const RXmlEngNodeSet aNodeSetThe node set to be appended

ArgCount()

TUint ArgCount()[pure virtual]

Gets 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.

Parameters

TUint aIndex

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.

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.

SetResult(TReal)

voidSetResult(TRealaNumber)[pure virtual]

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

Parameters

TReal 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

TBool 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

const TDesC8 & aStringThe string to store as the result