Xalan-C++ API Reference  1.12.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
xalanc::Function Class Referenceabstract

#include <xalanc/XPath/Function.hpp>

Inheritance diagram for xalanc::Function:
[legend]

Public Types

typedef xercesc::Locator LocatorType
 
typedef XPathExecutionContext::XObjectArgVectorType XObjectArgVectorType
 
typedef XPathExecutionContext::GetCachedString GetCachedString
 
typedef XPathExecutionContext::GetCachedNodeList GetCachedNodeList
 

Public Member Functions

 Function ()
 
virtual ~Function ()
 
virtual XObjectPtr execute (XPathExecutionContext &executionContext, XalanNode *context, const XObjectArgVectorType &args, const Locator *locator) const
 Execute an XPath function object. More...
 
virtual XObjectPtr execute (XPathExecutionContext &executionContext, XalanNode *context, const Locator *locator) const
 Execute an XPath function object. More...
 
virtual XObjectPtr execute (XPathExecutionContext &executionContext, XalanNode *context, const XObjectPtr arg, const Locator *locator) const
 Execute an XPath function object. More...
 
virtual XObjectPtr execute (XPathExecutionContext &executionContext, XalanNode *context, const XObjectPtr arg1, const XObjectPtr arg2, const Locator *locator) const
 Execute an XPath function object. More...
 
virtual XObjectPtr execute (XPathExecutionContext &executionContext, XalanNode *context, const XObjectPtr arg1, const XObjectPtr arg2, const XObjectPtr arg3, const Locator *locator) const
 Execute an XPath function object. More...
 
virtual Functionclone (MemoryManager &theManager) const =0
 Create a copy of the function object. More...
 

Protected Member Functions

virtual const XalanDOMStringgetError (XalanDOMString &theBuffer) const =0
 Get the error message to report when the function is called with the wrong number of arguments. More...
 
void generalError (XPathExecutionContext &executionContext, const XalanNode *context, const Locator *locator) const
 Report the error returned from the getError() call. More...
 

Detailed Description

Definition at line 57 of file Function.hpp.

Member Typedef Documentation

◆ GetCachedNodeList

Definition at line 71 of file Function.hpp.

◆ GetCachedString

Definition at line 70 of file Function.hpp.

◆ LocatorType

typedef xercesc::Locator xalanc::Function::LocatorType

Definition at line 61 of file Function.hpp.

◆ XObjectArgVectorType

Definition at line 69 of file Function.hpp.

Constructor & Destructor Documentation

◆ Function()

xalanc::Function::Function ( )
explicit

◆ ~Function()

virtual xalanc::Function::~Function ( )
virtual

Member Function Documentation

◆ clone()

virtual Function* xalanc::Function::clone ( MemoryManager &  theManager) const
pure virtual

Create a copy of the function object.

Returns
pointer to the new object

Implemented in xalanc::XalanEXSLTFunctionTan, xalanc::XalanEXSLTFunctionSqrt, xalanc::XalanEXSLTFunctionSin, xalanc::XalanEXSLTFunctionPower, xalanc::XalanEXSLTFunctionMin, xalanc::XalanEXSLTFunctionMax, xalanc::XalanEXSLTFunctionLowest, xalanc::XalanEXSLTFunctionLog, xalanc::XalanEXSLTFunctionHighest, xalanc::XalanEXSLTFunctionExp, xalanc::XalanEXSLTFunctionCos, xalanc::XalanEXSLTFunctionConstant, xalanc::XalanEXSLTFunctionDecodeURI, xalanc::XalanEXSLTFunctionTrailing, xalanc::XalanEXSLTFunctionAtan2, xalanc::XalanEXSLTFunctionEncodeURI, xalanc::XalanEXSLTFunctionAtan, xalanc::XalanEXSLTFunctionLeading, xalanc::XalanEXSLTFunctionAsin, xalanc::XalanEXSLTFunctionIntersection, xalanc::XalanEXSLTFunctionPadding, xalanc::XalanEXSLTFunctionAcos, xalanc::XalanEXSLTFunctionHasSameNode, xalanc::XalanEXSLTFunctionObjectType, xalanc::XalanEXSLTFunctionConcat, xalanc::XalanEXSLTFunctionRandom, xalanc::XalanEXSLTFunctionDistinct, xalanc::FunctionSubstring, xalanc::FunctionConcat, xalanc::FunctionID, xalanc::FunctionNamespaceURI, xalanc::FunctionString, xalanc::FunctionLang, xalanc::FunctionNormalizeSpace, xalanc::FunctionNodeSet, xalanc::XalanEXSLTFunctionEvaluate, xalanc::FunctionDocument, xalanc::FunctionFormatNumber, xalanc::FunctionGenerateID, xalanc::XalanEXSLTFunctionAlign, xalanc::FunctionKey, xalanc::XalanEXSLTFunctionAbs, xalanc::FunctionElementAvailable, xalanc::FunctionFunctionAvailable, xalanc::FunctionTranslate, xalanc::FunctionCurrent, xalanc::FunctionContains, xalanc::FunctionStartsWith, xalanc::FunctionSubstringAfter, xalanc::FunctionSubstringBefore, xalanc::FunctionDifference, xalanc::FunctionDistinct, xalanc::FunctionEvaluate, xalanc::FunctionHasSameNodes, xalanc::FunctionIntersection, xalanc::FunctionSystemProperty, xalanc::XalanEXSLTFunctionDateTime, xalanc::FunctionUnparsedEntityURI, xalanc::XalanEXSLTFunctionDifference, and xalanc::XalanEXSLTFunctionNodeSet.

◆ execute() [1/5]

virtual XObjectPtr xalanc::Function::execute ( XPathExecutionContext executionContext,
XalanNode context,
const Locator *  locator 
) const
virtual

Execute an XPath function object.

The function must return a valid object. Called if function has no parameters.

Parameters
executionContextexecuting context
contextcurrent context node
locatorLocator instance for the XPath expression that contains the function call
Returns
pointer to the result XObject

Reimplemented in xalanc::FunctionNamespaceURI, xalanc::FunctionString, xalanc::FunctionNormalizeSpace, xalanc::FunctionCurrent, and xalanc::FunctionGenerateID.

◆ execute() [2/5]

virtual XObjectPtr xalanc::Function::execute ( XPathExecutionContext executionContext,
XalanNode context,
const XObjectArgVectorType args,
const Locator *  locator 
) const
virtual

Execute an XPath function object.

The function must return a valid object. Extension functions should override this version of execute(), rather than one of the other calls designed for a specific number of arguments, since the extension function mechanism will call this version first. Extension functions that accept more than three arguments must override this version.

Parameters
executionContextexecuting context
contextcurrent context node
argsvector of pointers to XObject arguments
locatorLocator instance for the XPath expression that contains the function call
Returns
pointer to the result XObject

Reimplemented in xalanc::XalanEXSLTFunctionTan, xalanc::XalanEXSLTFunctionSqrt, xalanc::XalanEXSLTFunctionSin, xalanc::XalanEXSLTFunctionPower, xalanc::XalanEXSLTFunctionMin, xalanc::XalanEXSLTFunctionMax, xalanc::XalanEXSLTFunctionLowest, xalanc::XalanEXSLTFunctionLog, xalanc::XalanEXSLTFunctionHighest, xalanc::XalanEXSLTFunctionExp, xalanc::XalanEXSLTFunctionCos, xalanc::XalanEXSLTFunctionConstant, xalanc::XalanEXSLTFunctionDecodeURI, xalanc::XalanEXSLTFunctionTrailing, xalanc::XalanEXSLTFunctionAtan2, xalanc::XalanEXSLTFunctionEncodeURI, xalanc::XalanEXSLTFunctionAtan, xalanc::XalanEXSLTFunctionLeading, xalanc::XalanEXSLTFunctionAsin, xalanc::XalanEXSLTFunctionPadding, xalanc::XalanEXSLTFunctionAcos, xalanc::XalanEXSLTFunctionHasSameNode, xalanc::XalanEXSLTFunctionObjectType, xalanc::XalanEXSLTFunctionConcat, xalanc::XalanEXSLTFunctionRandom, xalanc::FunctionNodeSet, xalanc::XalanEXSLTFunctionEvaluate, xalanc::XalanEXSLTFunctionAlign, xalanc::XalanEXSLTFunctionAbs, xalanc::FunctionEvaluate, xalanc::FunctionDifference, xalanc::FunctionDistinct, xalanc::FunctionHasSameNodes, xalanc::FunctionIntersection, xalanc::FunctionConcat, and xalanc::XalanEXSLTFunctionDateTime.

◆ execute() [3/5]

virtual XObjectPtr xalanc::Function::execute ( XPathExecutionContext executionContext,
XalanNode context,
const XObjectPtr  arg,
const Locator *  locator 
) const
virtual

Execute an XPath function object.

The function must return a valid object. Called if function has one parameter.

Parameters
executionContextexecuting context
contextcurrent context node
argpointer to XObject argument
locatorLocator instance for the XPath expression that contains the function call
Returns
pointer to the result XObject

Reimplemented in xalanc::FunctionID, xalanc::FunctionNamespaceURI, xalanc::FunctionString, xalanc::FunctionLang, xalanc::FunctionNormalizeSpace, xalanc::FunctionGenerateID, xalanc::FunctionElementAvailable, xalanc::FunctionFunctionAvailable, xalanc::FunctionSystemProperty, xalanc::FunctionUnparsedEntityURI, and xalanc::FunctionDocument.

◆ execute() [4/5]

virtual XObjectPtr xalanc::Function::execute ( XPathExecutionContext executionContext,
XalanNode context,
const XObjectPtr  arg1,
const XObjectPtr  arg2,
const Locator *  locator 
) const
virtual

Execute an XPath function object.

The function must return a valid object. Called if function has two parameters.

Parameters
executionContextexecuting context
contextcurrent context node
arg1pointer to XObject argument
arg2pointer to XObject argument
locatorLocator instance for the XPath expression that contains the function call
Returns
pointer to the result XObject

Reimplemented in xalanc::FunctionSubstring, xalanc::FunctionConcat, xalanc::FunctionDocument, xalanc::FunctionKey, xalanc::FunctionContains, xalanc::FunctionStartsWith, xalanc::FunctionSubstringAfter, xalanc::FunctionSubstringBefore, and xalanc::FunctionFormatNumber.

◆ execute() [5/5]

virtual XObjectPtr xalanc::Function::execute ( XPathExecutionContext executionContext,
XalanNode context,
const XObjectPtr  arg1,
const XObjectPtr  arg2,
const XObjectPtr  arg3,
const Locator *  locator 
) const
virtual

Execute an XPath function object.

The function must return a valid object. Called if function has three parameters.

Parameters
executionContextexecuting context
contextcurrent context node
arg1pointer to XObject arguments
arg2pointer to XObject argument
arg3pointer to XObject argument
locatorLocator instance for the XPath expression that contains the function call
Returns
pointer to the result XObject

Reimplemented in xalanc::FunctionSubstring, xalanc::FunctionConcat, xalanc::FunctionFormatNumber, and xalanc::FunctionTranslate.

◆ generalError()

void xalanc::Function::generalError ( XPathExecutionContext executionContext,
const XalanNode context,
const Locator *  locator 
) const
protected

Report the error returned from the getError() call.

Parameters
executionContextThe current XPathExecutionContext
contextThe context node
locatorThe Locator instance for the XPath expression that contains the function call

◆ getError()

virtual const XalanDOMString& xalanc::Function::getError ( XalanDOMString theBuffer) const
protectedpure virtual

Get the error message to report when the function is called with the wrong number of arguments.

Parameters
theBufferThe XalanDOMString for the message.
Returns
The error message

Implemented in xalanc::XalanEXSLTFunctionObjectType, xalanc::FunctionSubstring, xalanc::FunctionConcat, xalanc::FunctionID, xalanc::FunctionNamespaceURI, xalanc::FunctionString, xalanc::FunctionLang, xalanc::FunctionNormalizeSpace, xalanc::XalanEXSLTFunctionEvaluate, xalanc::FunctionNodeSet, xalanc::FunctionDocument, xalanc::FunctionGenerateID, xalanc::FunctionKey, xalanc::FunctionFunctionAvailable, xalanc::XalanEXSLTFunctionDateTime, xalanc::FunctionContains, xalanc::FunctionStartsWith, xalanc::FunctionSubstringAfter, xalanc::FunctionTranslate, xalanc::FunctionDifference, xalanc::FunctionDistinct, xalanc::FunctionEvaluate, xalanc::FunctionHasSameNodes, xalanc::FunctionIntersection, xalanc::FunctionSubstringBefore, xalanc::FunctionSystemProperty, xalanc::FunctionUnparsedEntityURI, xalanc::XalanEXSLTFunctionTan, xalanc::XalanEXSLTFunctionSqrt, xalanc::XalanEXSLTFunctionSin, xalanc::XalanEXSLTFunctionPower, xalanc::XalanEXSLTFunctionMin, xalanc::XalanEXSLTFunctionMax, xalanc::XalanEXSLTFunctionLowest, xalanc::XalanEXSLTFunctionLog, xalanc::XalanEXSLTFunctionHighest, xalanc::XalanEXSLTFunctionExp, xalanc::XalanEXSLTFunctionCos, xalanc::XalanEXSLTFunctionConstant, xalanc::XalanEXSLTFunctionDecodeURI, xalanc::XalanEXSLTFunctionTrailing, xalanc::XalanEXSLTFunctionAtan2, xalanc::XalanEXSLTFunctionEncodeURI, xalanc::XalanEXSLTFunctionAtan, xalanc::XalanEXSLTFunctionLeading, xalanc::XalanEXSLTFunctionAsin, xalanc::XalanEXSLTFunctionIntersection, xalanc::XalanEXSLTFunctionPadding, xalanc::XalanEXSLTFunctionAcos, xalanc::XalanEXSLTFunctionHasSameNode, xalanc::XalanEXSLTFunctionConcat, xalanc::XalanEXSLTFunctionRandom, xalanc::XalanEXSLTFunctionDistinct, xalanc::XalanEXSLTFunctionAlign, xalanc::XalanEXSLTFunctionAbs, xalanc::XalanEXSLTFunctionDifference, and xalanc::XalanEXSLTFunctionNodeSet.


The documentation for this class was generated from the following file: