SaxonC 12.0
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.
 
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 constructor created as a wrapper around an existing Saxon Java object.
 
 XdmItem (const XdmItem &item)
 Copy constructor.
 
virtual ~XdmItem ()
 Destructor.
 
virtual void incrementRefCount ()
 Increment reference count of this XdmItem - Memory management - Internal use only.
 
virtual void decrementRefCount ()
 Decrement reference count of this XdmItem - Memory management - Internal use only.
 
virtual bool isAtomic ()
 
virtual bool isNode ()
 
virtual bool isFunction ()
 
virtual bool isMap ()
 
virtual bool isArray ()
 
virtual int64_t getUnderlyingValue ()
 
virtual const char * getStringValue ()
 
const char * toString ()
 Create a string representation of the value.
 
virtual XdmItemgetHead ()
 
XdmItemitemAt (int n)
 
int size ()
 
virtual XDM_TYPE getType ()
 
- 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 ()
 Delete the XdmValue object and clean up all items in the sequence. Release the underlying JNI object.
 
virtual XdmItemgetHead ()
 Get the first item in the sequence.
 
virtual XdmItemitemAt (int n)
 Get the n'th item in the value, counting from zero.
 
virtual int size ()
 
virtual const char * toString ()
 Create a string representation of the value.
 
int getRefCount ()
 Get the number of references on this XdmValue.
 
virtual void incrementRefCount ()
 Increment reference count of this XdmValue - Memory management - Internal use only.
 
virtual void decrementRefCount ()
 Decrement reference count of this XdmValue - Memory management - Internal use only.
 
virtual int64_t getUnderlyingValue ()
 
virtual XDM_TYPE getType ()
 

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
 
char * stringValue
 
- Protected Attributes inherited from XdmValue
char * valueType
 
std::vector< XdmItem * > values
 
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

◆ 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: