SaxonC 12.5
Saxon Processor library for C/C++, PHP and Python
|
#include <XdmArray.h>
Public Member Functions | |
XdmArray () | |
XdmArray default constructor. | |
XdmArray (const XdmArray &d) | |
Copy constructor. | |
virtual | ~XdmArray () |
Destructor. | |
XdmArray (int64_t obj) | |
XdmArray (int64_t obj, int len) | |
int | arrayLength () |
Get the number of members in the array. | |
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 () |
const char * | getStringValue () |
Get the string value of the XdmArray item. | |
bool | isFunction () |
XDM_TYPE | getType () |
bool | isArray () |
Determine whether the item is an array or some other type of item. | |
const char * | toString () |
Public Member Functions inherited from XdmFunctionItem | |
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. | |
const char * | getStringValue () |
Get the string value of the XdmArray item. | |
XdmValue ** | createXdmValueArray (int len) |
XdmValue * | call (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 int64_t | getUnderlyingValue () |
const char * | toString () |
virtual XdmItem * | getHead () |
XdmItem * | itemAt (int n) |
int | size () |
Public Member Functions inherited from XdmValue | |
XdmValue () | |
A default Constructor. | |
XdmValue (const XdmValue &other) | |
A copy constructor. | |
XdmValue * | addXdmValueWithType (const char *tStr, const char *val) |
Add an XdmItem to the sequence. | |
void | addXdmItem (XdmItem *val) |
void | addXdmItemFromUnderlyingValue (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. | |
void | resetRelinquishedItems () |
void | incrementRefCountForRelinquishedValue (int i) |
Additional Inherited Members | |
Static Public Member Functions inherited from XdmFunctionItem | |
static XdmFunctionItem * | getSystemFunction (SaxonProcessor *processor, const char *name, int arity) |
Get a system function. | |
Protected Member Functions inherited from XdmFunctionItem | |
XdmValue * | getXdmValueSubClass (int64_t value) |
Protected Member Functions inherited from XdmValue | |
void | initialize () |
initialize this XdmValue with default values | |
Protected Attributes inherited from XdmFunctionItem | |
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 |
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 | ( | int64_t | obj | ) |
XdmArray::XdmArray | ( | int64_t | 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.
|
virtual |
|
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