SaxonC  11.4
Saxon Processor library for C/C++, PHP and Python
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
XdmFunctionItem Class Reference

#include <XdmFunctionItem.h>

Inheritance diagram for XdmFunctionItem:
XdmItem XdmValue XdmArray XdmMap

Public Member Functions

 XdmFunctionItem ()
 Default constructor for XdmFunctionItem. More...
 XdmFunctionItem (jobject obj)
 XdmFunctionItem constructor created from a Java object - internal use. More...
 XdmFunctionItem (const XdmFunctionItem &d)
 Copy constructor. More...
virtual ~XdmFunctionItem ()
 Destructor. More...
const char * getName ()
 Get the name of the function as EQName. More...
virtual int getArity ()
 Get the arity of the function. More...
XdmValue ** createXdmValueArray (int len)
XdmValuecall (SaxonProcessor *processor, XdmValue **arguments, int argument_length)
 Call the function. More...
bool isAtomic ()
XDM_TYPE getType ()
bool isFunction ()
 Determine whether the item is a function or some other type of item. More...
- Public Member Functions inherited from XdmItem
 XdmItem ()
 XdmItem default constructor. More...
 XdmItem (jobject)
 XdmItem constructor created as a wrapper around an existing Saxon Java object. More...
 XdmItem (const XdmItem &item)
 Copy constructor. More...
virtual ~XdmItem ()
 Destructor. More...
virtual void incrementRefCount ()
 Increment reference count of this XdmItem - Memory management - Internal use only. More...
virtual void decrementRefCount ()
 Decrement reference count of this XdmItem - Memory management - Internal use only. More...
virtual bool isNode ()
virtual bool isMap ()
virtual bool isArray ()
virtual jobject getUnderlyingValue ()
virtual const char * getStringValue ()
const char * toString ()
 Create a string representation of the value. More...
virtual XdmItemgetHead ()
XdmItemitemAt (int n)
int size ()
- Public Member Functions inherited from XdmValue
 XdmValue ()
 A default Constructor. More...
 XdmValue (const XdmValue &other)
 A copy constructor. More...
XdmValueaddXdmValueWithType (const char *tStr, const char *val)
 Add an XdmItem to the sequence. More...
void addXdmItem (XdmItem *val)
void addUnderlyingValue (jobject val)
 XdmValue (jobject val, bool arrFlag)
 A Constructor for handling XdmArray - Internal user only. More...
 XdmValue (jobject val)
 A Constructor. More...
virtual ~XdmValue ()
 Destructor. More...
void releaseXdmValue ()
 Delete the XdmValue object and clean up all items in the sequence. Release the underlying JNI object.
int getRefCount ()
 Get the number of references on this XdmValue. More...

Static Public Member Functions

static XdmFunctionItemgetSystemFunction (SaxonProcessor *processor, const char *name, int arity)
 Get a system function. More...

Protected Attributes

std::string fname
- Protected Attributes inherited from XdmItem
jobject value
std::string stringValue
- Protected Attributes inherited from XdmValue
char * valueType
std::vector< XdmItem * > values
int xdmSize
int refCount

Additional Inherited Members

- Protected Member Functions inherited from XdmValue
void initialize ()
 initialize this XdmValue with default values

Detailed Description

The class XdmFunctionItem represents a function item

Constructor & Destructor Documentation

◆ XdmFunctionItem() [1/3]

XdmFunctionItem::XdmFunctionItem ( )

Default constructor for XdmFunctionItem.

Create an empty XdmFunctionItem

◆ XdmFunctionItem() [2/3]

XdmFunctionItem::XdmFunctionItem ( jobject  obj)

XdmFunctionItem constructor created from a Java object - internal use.

XdmFunctionItem constructor created from a JNI Java object. This is for internal use only

obj- The internal Java object for the XdmFunctionItem is wrapped here in the C++ XdmArray

◆ XdmFunctionItem() [3/3]

XdmFunctionItem::XdmFunctionItem ( const XdmFunctionItem d)

Copy constructor.

Copy constructor for XdmFunctionItem

◆ ~XdmFunctionItem()

virtual XdmFunctionItem::~XdmFunctionItem ( )


Destructor for XdmFunctionItem

Member Function Documentation

◆ call()

XdmValue * XdmFunctionItem::call ( SaxonProcessor processor,
XdmValue **  arguments,
int  argument_length 

Call the function.

processor- the SaxonProcessor object required in the call of the function
arguments- the values to be supplied as arguments to the function. The "function conversion rules" will be applied to convert the arguments to the required type when necessary.
argument_length- the length of the array
the result of calling the function

◆ createXdmValueArray()

XdmValue** XdmFunctionItem::createXdmValueArray ( int  len)

Utility method for working with SaxonC on Python

◆ getArity()

int XdmFunctionItem::getArity ( )

Get the arity of the function.

the arity of the function, that is, the number of arguments in the function's signature

Reimplemented in XdmArray.

◆ getName()

const char * XdmFunctionItem::getName ( )

Get the name of the function as EQName.

The expanded name, as a string using the notation devised by EQName. If the name is in a namespace, the resulting string takes the form Q{uri}local. Otherwise, the value is the local part of the name.

the function name as a string in the EQName notation, or null for an anonymous inline function item

◆ getSystemFunction()

XdmFunctionItem * XdmFunctionItem::getSystemFunction ( SaxonProcessor processor,
const char *  name,
int  arity 

Get a system function.

This can be any function defined in XPath 3.1 functions and operators, including functions in the math, map, and array namespaces. It can also be a Saxon extension function, provided a licensed Processor is used.

processor- The Saxon Processor object required to get the system function
name- the name of the function
arity- the number of arguments in the function
the requested function, or null if there is no such function. Note that some functions (those with particular context dependencies) may be unsuitable for dynamic calling.

◆ getType()

XDM_TYPE XdmFunctionItem::getType ( )

Get the type of the object

Reimplemented from XdmItem.

Reimplemented in XdmMap.

◆ isAtomic()

bool XdmFunctionItem::isAtomic ( )

Check if this XdmItem is atomic


Reimplemented from XdmItem.

◆ isFunction()

bool XdmFunctionItem::isFunction ( )

Determine whether the item is a function or some other type of item.

true if the item is a Xdm function item, false if it is an atomic value or a function (including maps and arrays)

Reimplemented from XdmItem.

Reimplemented in XdmMap.

Member Data Documentation

◆ fname

std::string XdmFunctionItem::fname

The name of the function item

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