SaxonC 12.4
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected 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.
 
 XdmFunctionItem (int64_t obj)
 XdmFunctionItem constructor created from a Java object - internal use.
 
 XdmFunctionItem (const XdmFunctionItem &d)
 Copy constructor.
 
virtual ~XdmFunctionItem ()
 Destructor.
 
const char * getName ()
 Get the name of the function as EQName.
 
virtual int getArity ()
 Get the arity of the function.
 
const char * getStringValue ()
 Get the string value of the XdmArray item.
 
XdmValue ** createXdmValueArray (int len)
 
XdmValuecall (SaxonProcessor *processor, XdmValue **arguments, int argument_length)
 Call the function.
 
bool isAtomic ()
 
XDM_TYPE getType ()
 
bool isFunction ()
 Determine whether the item is a function or some other type of item.
 
- Public Member Functions inherited from XdmItem
 XdmItem ()
 XdmItem default constructor.
 
 XdmItem (int64_t)
 
 XdmItem (const XdmItem &item)
 Copy constructor.
 
virtual ~XdmItem ()
 Destructor.
 
virtual void incrementRefCount ()
 
virtual void decrementRefCount ()
 
virtual bool isNode ()
 
virtual bool isMap ()
 
virtual bool isArray ()
 
virtual int64_t getUnderlyingValue ()
 
const char * toString ()
 
virtual XdmItemgetHead ()
 
XdmItemitemAt (int n)
 
int size ()
 
- Public Member Functions inherited from XdmValue
 XdmValue ()
 A default Constructor.
 
 XdmValue (const XdmValue &other)
 A copy constructor.
 
XdmValueaddXdmValueWithType (const char *tStr, const char *val)
 Add an XdmItem to the sequence.
 
void addXdmItem (XdmItem *val)
 
void addUnderlyingValue (int64_t val)
 
 XdmValue (int64_t val, bool arrFlag)
 A Constructor for handling XdmArray - Internal user only.
 
 XdmValue (int64_t val)
 A Constructor.
 
virtual ~XdmValue ()
 Destructor.
 
void releaseXdmValue ()
 
int getRefCount ()
 Get the number of references on this XdmValue.
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

char * fname
 
- Protected Attributes inherited from XdmItem
int64_t value
 
const char * stringValue
 
const char * itemToString
 
- Protected Attributes inherited from XdmValue
char * valueType
 
XdmItem ** values
 
char * relinquished_values
 
int values_cap
 
int xdmSize
 
int refCount
 

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 ( int64_t  obj)

XdmFunctionItem constructor created from a Java object - internal use.

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

Parameters
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 ( )
inlinevirtual

Destructor.

Destructor for XdmFunctionItem

Member Function Documentation

◆ call()

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

Call the function.

Parameters
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
Returns
the result of calling the function

◆ createXdmValueArray()

XdmValue ** XdmFunctionItem::createXdmValueArray ( int  len)
inline

Utility method for working with SaxonC on Python

◆ getArity()

int XdmFunctionItem::getArity ( )
virtual

Get the arity of the function.

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

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

◆ getStringValue()

const char * XdmFunctionItem::getStringValue ( )
virtual

Get the string value of the XdmArray item.

Get the string value of the function

Returns
nothing; this method always throws an exception

Reimplemented from XdmItem.

◆ getSystemFunction()

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

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.

Parameters
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
Returns
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 ( )
inlinevirtual

Get the type of the object

Reimplemented from XdmItem.

Reimplemented in XdmMap.

◆ isAtomic()

bool XdmFunctionItem::isAtomic ( )
inlinevirtual

Check if this XdmItem is atomic

Returns
false

Reimplemented from XdmItem.

◆ isFunction()

bool XdmFunctionItem::isFunction ( )
inlinevirtual

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

Returns
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

char* XdmFunctionItem::fname
protected

The name of the function item


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