SaxonC
11.6
Saxon Processor library for C/C++, PHP and Python
|
#include <XdmArray.h>
Public Member Functions | |
XdmArray () | |
XdmArray default constructor. More... | |
XdmArray (const XdmArray &d) | |
Copy constructor. More... | |
virtual | ~XdmArray () |
Destructor. More... | |
XdmArray (jobject obj) | |
XdmArray constructor which is used a wrapper class for the Java XdmArray object - internal use. More... | |
XdmArray (jobject obj, int len) | |
XdmArray constructor which is used a wrapper class for the Java XdmArray object - internal use. More... | |
int | arrayLength () |
Get the number of members in the array. More... | |
XdmValue * | get (int n) |
XdmArray * | put (int n, XdmValue *value) |
XdmArray * | addMember (XdmValue *value) |
XdmArray * | concat (XdmArray *value) |
std::list< XdmValue * > | asList () |
XdmValue ** | createXdmValueArray (int len) |
XdmValue ** | values () |
int | getArity () |
bool | isFunction () |
XDM_TYPE | getType () |
bool | isArray () |
Determine whether the item is an array or some other type of item. More... | |
const char * | toString () |
The toString() method returns a simple XML serialization of the node with defaulted serialization parameters. More... | |
Public Member Functions inherited from XdmFunctionItem | |
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... | |
XdmValue ** | createXdmValueArray (int len) |
XdmValue * | call (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 jobject | getUnderlyingValue () |
virtual const char * | getStringValue () |
const char * | toString () |
Create a string representation of the value. More... | |
virtual XdmItem * | getHead () |
XdmItem * | itemAt (int n) |
int | size () |
Public Member Functions inherited from XdmValue | |
XdmValue () | |
A default Constructor. More... | |
XdmValue (const XdmValue &other) | |
A copy constructor. More... | |
XdmValue * | addXdmValueWithType (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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from XdmFunctionItem | |
static XdmFunctionItem * | getSystemFunction (SaxonProcessor *processor, const char *name, int arity) |
Get a system function. More... | |
Protected Member Functions inherited from XdmValue | |
void | initialize () |
initialize this XdmValue with default values | |
Protected Attributes inherited from XdmFunctionItem | |
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 |
An array in the XDM data model. An array is a list of zero or more members, each of which is an arbitrary XDM value. The array itself is an XDM item.
An XdmArray is immutable.
|
inlinevirtual |
Destructor.
Destructor for XdmArray
XdmArray::XdmArray | ( | jobject | obj | ) |
XdmArray::XdmArray | ( | jobject | obj, |
int | len | ||
) |
Append a new member to an array
value | - the new member |
int XdmArray::arrayLength | ( | ) |
Get the number of members in the array.
size()
method returns 1 (one), because an XDM array is an item.) std::list< XdmValue * > XdmArray::asList | ( | ) |
Get the members of the array in the form of a list.
Concatenate another array
value | - the other array |
|
inline |
Utility method for working with SaxonC on Python Create an array of xdmValue objects
len | - the length of the array to create |
XdmValue * XdmArray::get | ( | int | n | ) |
Get the n'th member in the array, counting from zero.
n | the member that is required, counting the first member in the array as member zero |
|
inlinevirtual |
Get the arity of the function
Reimplemented from XdmFunctionItem.
|
inlinevirtual |
Get the type of the object
Reimplemented from XdmItem.
|
inlinevirtual |
Determine whether the item is an array or some other type of item.
Reimplemented from XdmItem.
|
inlinevirtual |
Determine whether the item is a function or some other type of item
Reimplemented from XdmItem.
Create a new array in which one member is replaced with a new value.
n | the position of the member that is to be replaced, counting the first member in the array as member zero |
value | - is the new member for the the new array |
|
virtual |
The toString() method returns a simple XML serialization of the node with defaulted serialization parameters.
In the case of an element node, the result will be a well-formed XML document serialized as defined in the W3C XSLT/XQuery serialization specification, using options method="xml", indent="yes", omit-xml-declaration="yes".
In the case of a document node, the result will be a well-formed XML document provided that the document node contains exactly one element child, and no text node children. In other cases it will be a well-formed external general parsed entity.
In the case of an attribute node, the output is a string in the form name="value"
. The name will use the original namespace prefix.
In the case of a namespace node, the output is a string in the form of a namespace declaration, that is xmlns="uri"
or xmlns:pre="uri"
.
Other nodes, such as text nodes, comments, and processing instructions, are represented as they would appear in lexical XML. Note: this means that in the case of text nodes, special characters such as &
and <
are output in escaped form. To get the unescaped string value of a text node, use getStringValue()
instead.
Reimplemented from XdmValue.
XdmValue ** XdmArray::values | ( | ) |
Get the members of the array in the form of an array