![]() |
SaxonC 12.7.0
Saxon Processor library for C/C++, PHP and Python
|
The class XdmAtomicValue represents an item in an XPath sequence that is an atomic value. More...
#include <XdmAtomicValue.h>
Public Member Functions | |
XdmAtomicValue () | |
Default constructor. | |
XdmAtomicValue (const XdmAtomicValue &other) | |
XdmAtomicValue copy constructor. | |
virtual | ~XdmAtomicValue () |
Destructor method for XdmAtomicValue. | |
XdmAtomicValue (int64_t val) | |
XdmAtomicValue constructor to create an object which is a wrapper for a Java XdmAtomicValue object - internal use only. | |
XdmAtomicValue (int64_t val, const char *ty) | |
XdmAtomicValue constructor to create an object which is a wrapper for a Java XdmAtomicValue object - internal use only. | |
const char * | getPrimitiveTypeName () |
Get the primitive type of this atomic value, as a QName. | |
bool | getBooleanValue () |
Get the value converted to a boolean using the XPath casting rules. | |
double | getDoubleValue () |
Get the value converted to a double using the XPath casting rules. | |
const char * | getStringValue (const char *encoding=nullptr) |
Get the string value of the item. | |
long | getLongValue () |
Get the value converted to an integer using the XPath casting rules. | |
void | setType (const char *ty) |
Set the type annotation of the atomic value. | |
XdmItem * | getHead () |
Get the first item in the sequence consisting of just this item. | |
bool | isAtomic () |
Determine whether the item is an atomic value or some other type of item. | |
int | getHashCode () |
Get a hashcode that reflects the rules for equality matching. | |
XDM_TYPE | getType () |
Get the type of this XDM value. | |
![]() | |
XdmItem () | |
Default constructor. | |
XdmItem (int64_t objRef) | |
XdmItem constructor to create an object which is a wrapper for a Java XdmItem object - internal use only. | |
XdmItem (const XdmItem &item) | |
XdmItem copy constructor. | |
bool | operator== (const XdmItem &other) const |
virtual | ~XdmItem () |
Destructor method for XdmItem. | |
virtual void | incrementRefCount () |
Increment reference count of this XdmItem - internal use only. | |
virtual void | decrementRefCount () |
Decrement reference count of this XdmItem - internal use only. | |
virtual bool | isNode () |
Determine whether the item is a node or some other type of item. | |
virtual bool | isFunction () |
Determine whether the item is an XDM function or some other type of item. | |
virtual bool | isMap () |
Determine whether the item is an XDM map or some other type of item. | |
virtual bool | isArray () |
Determine whether the item is an XDM array or some other type of item. | |
virtual int64_t | getUnderlyingValue () |
Get the underlying Java XdmValue object - internal use only. | |
const char * | toString (const char *encoding=nullptr) |
Create a string representation of the item. | |
XdmItem * | itemAt (int n) |
Get the n'th item in the sequence consisting of just this item, counting from zero. | |
int | size () |
Get the number of items in the sequence. | |
![]() | |
XdmValue () | |
Default constructor. | |
XdmValue (const XdmValue &other) | |
XdmValue copy constructor. | |
void | addXdmItem (XdmItem *val) |
Add an XdmItem to the sequence. | |
virtual bool | operator== (const XdmValue &other) const |
void | addXdmItemFromUnderlyingValue (XdmItem *val) |
Add an XdmItem to the sequence, when the sequence was returned from SaxonC - internal use only. | |
void | addUnderlyingValue (int64_t val) |
Add Java XdmValue object to the sequence. | |
XdmValue (int64_t val, bool arrFlag) | |
A Constructor for handling XdmArray - internal use only. | |
XdmValue (int64_t val) | |
XdmValue constructor to create an object which is a wrapper for a Java XdmValue object - internal use only. | |
virtual | ~XdmValue () |
Destructor method for XdmValue. | |
void | releaseXdmValue () |
Deprecated: this is deprecated and a no-op, the C++ destructor handles this case. | |
int | getRefCount () |
Get the number of references on this XdmValue - internal use only This method is used for internal memory management. | |
void | resetRelinquishedItems () |
Reset associated reference counts on XdmItems that have been relinquished - internal use only. | |
void | incrementRefCountForRelinquishedValue (int i) |
Increment the ref count for a relinquished item only once - internal use only. | |
Additional Inherited Members | |
![]() | |
void | initialize () |
Initialize this XdmValue with default values. | |
![]() | |
const char * | stringValue |
const char * | itemToString |
![]() | |
char * | valueType |
XdmItem ** | values |
char * | relinquished_values |
int | values_cap |
int | xdmSize |
int | refCount |
int64_t | value |
The class XdmAtomicValue represents an item in an XPath sequence that is an atomic value.
The value may belong to any of the 19 primitive types defined in XML Schema, or to a type derived from these primitive types, or the XPath type xs:untypedAtomic. The type may be either a built-in type or a user-defined type.
An XdmAtomicValue
is immutable.
XdmAtomicValue::XdmAtomicValue | ( | ) |
Default constructor.
Creates an empty atomic value
XdmAtomicValue::XdmAtomicValue | ( | const XdmAtomicValue & | other | ) |
XdmAtomicValue copy constructor.
other | - XdmAtomicValue |
XdmAtomicValue::XdmAtomicValue | ( | int64_t | val | ) |
XdmAtomicValue constructor to create an object which is a wrapper for a Java XdmAtomicValue object - internal use only.
val | - internal Java XdmAtomicValue object to be wrapped |
XdmAtomicValue::XdmAtomicValue | ( | int64_t | val, |
const char * | ty ) |
XdmAtomicValue constructor to create an object which is a wrapper for a Java XdmAtomicValue object - internal use only.
val | - internal Java XdmAtomicValue object to be wrapped |
ty | - type of the XdmAtomicValue |
bool XdmAtomicValue::getBooleanValue | ( | ) |
Get the value converted to a boolean using the XPath casting rules.
double XdmAtomicValue::getDoubleValue | ( | ) |
Get the value converted to a double using the XPath casting rules.
If the value is a string, the XSD 1.1 rules are used, which means that the string "+INF" is recognised.
int XdmAtomicValue::getHashCode | ( | ) |
Get a hashcode that reflects the rules for equality matching.
|
virtual |
Get the first item in the sequence consisting of just this item.
Reimplemented from XdmItem.
long XdmAtomicValue::getLongValue | ( | ) |
Get the value converted to an integer using the XPath casting rules.
const char * XdmAtomicValue::getPrimitiveTypeName | ( | ) |
Get the primitive type of this atomic value, as a QName.
The primitive types for this purpose are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is xs:anyAtomicType.
|
virtual |
Get the string value of the item.
For a node, this gets the string value of the node. For an atomic value, it has the same effect as casting the value to a string. In all cases the result is the same as applying the XPath string() function.
For atomic values, the result is the same as the result of calling toString
. This is not the case for nodes, where toString
returns an XML serialization of the node.
encoding | - the encoding of the string returned. If NULL or omitted defaults to the JVM encoding, which in most cases is UTF-8. |
Reimplemented from XdmItem.
|
inlinevirtual |
|
inlinevirtual |
Determine whether the item is an atomic value or some other type of item.
Reimplemented from XdmItem.
void XdmAtomicValue::setType | ( | const char * | ty | ) |
Set the type annotation of the atomic value.
ty | - the annotated type given as a string |