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.

Public Member Functions
void AppendToResult (const TXmlEngNode )
void AppendToResult (const TXmlEngNamespace , const TXmlEngElement )
void AppendToResult (const RXmlEngNodeSet )
TUint ArgCount ()
const RXmlEngXPathResult Argument ( TUint )
void * ExtendedContext ()
void InitializeNodeSetResult ()
const RXmlEngXPathResult Result ()
void SetResult ( TReal )
void SetResult ( TBool )
void SetResultL (const TDesC8 &)

Member Functions Documentation

AppendToResult(const TXmlEngNode)

void AppendToResult ( const TXmlEngNode aNode ) [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 aNode Node to be added

AppendToResult(const TXmlEngNamespace, const TXmlEngElement)

void AppendToResult ( const TXmlEngNamespace aAppendedNsNode,
const TXmlEngElement aNsParentNode
) [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.

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

const TXmlEngNamespace aAppendedNsNode A namspace node to add to the node set result.
const TXmlEngElement aNsParentNode An element node that holds the namespace declaration represented by aAppendedNsNode.

AppendToResult(const RXmlEngNodeSet)

void AppendToResult ( const RXmlEngNodeSet aNodeSet ) [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 aNodeSet The node set to be appended

ArgCount()

TUint ArgCount ( ) [pure virtual]

Gets the number of arguments provided.

Argument(TUint)

const RXmlEngXPathResult Argument ( TUint aIndex ) [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()

void InitializeNodeSetResult ( ) [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 RXmlEngXPathResult Result ( ) [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)

void SetResult ( TReal aNumber ) [pure virtual]

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

Parameters

TReal aNumber The number to store as the result

SetResult(TBool)

void SetResult ( TBool aBoolean ) [pure virtual]

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

Parameters

TBool aBoolean The value to store as the result

SetResultL(const TDesC8 &)

void SetResultL ( const TDesC8 & aString ) [pure virtual]

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

Parameters

const TDesC8 & aString The string to store as the result