SaxonC
11.6
Saxon Processor library for C/C++, PHP and Python
|
#include <XdmAtomicValue.h>
Public Member Functions | |
XdmAtomicValue () | |
A default Constructor. More... | |
XdmAtomicValue (const XdmAtomicValue &other) | |
A copy constructor. More... | |
virtual | ~XdmAtomicValue () |
Destructor. More... | |
XdmAtomicValue (jobject val) | |
A Java Wrapper Constructor. More... | |
XdmAtomicValue (jobject val, const char *ty) | |
A Java Wrapper Constructor. More... | |
const char * | getPrimitiveTypeName () |
Get the primitive type of this atomic value, as a QName. More... | |
bool | getBooleanValue () |
Get the value converted to a boolean using the XPath casting rules. More... | |
double | getDoubleValue () |
Get the value converted to a double using the XPath casting rules. More... | |
const char * | getStringValue () |
Get the string value of the item. More... | |
long | getLongValue () |
Get the value converted to an integer using the XPath casting rules. More... | |
void | setType (const char *ty) |
Set the type annotation of the atomic value. More... | |
XdmItem * | getHead () |
Get the first item in the sequence. More... | |
bool | isAtomic () |
Determine whether the item is an atomic value or some other type of item. More... | |
int | getHashCode () |
Get a hashcode that reflects the rules for equality matching. More... | |
XDM_TYPE | getType () |
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 | isFunction () |
virtual bool | isMap () |
virtual bool | isArray () |
virtual jobject | getUnderlyingValue () |
const char * | toString () |
Create a string representation of the value. More... | |
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 | |
Protected Member Functions inherited from XdmValue | |
void | initialize () |
initialize this XdmValue with default values | |
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 |
The class XdmAtomicValue represents an item in an XPath 2.0 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 2.0 type xs:untypedAtomic. The type may be either a built-in type or a user-defined type.
An XdmAtomicValue
is immutable.
XdmAtomicValue::XdmAtomicValue | ( | ) |
A default Constructor.
Create a empty atomic value
XdmAtomicValue::XdmAtomicValue | ( | const XdmAtomicValue & | other | ) |
A copy constructor.
other | - XdmAtomicValue |
|
virtual |
Destructor.
Destructor for this XdmAtomicValue
XdmAtomicValue::XdmAtomicValue | ( | jobject | val | ) |
A Java Wrapper Constructor.
Wrap a Java XdmAtomicValue object.
val | - Java XdmAtomicValue object |
XdmAtomicValue::XdmAtomicValue | ( | jobject | val, |
const char * | ty | ||
) |
A Java Wrapper Constructor.
Wrap a Java XdmAtomicValue object.
val | - Java XdmAtomicValue object |
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 |
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.
Reimplemented from XdmItem.
|
inlinevirtual |
Get the type of the object
Reimplemented from XdmItem.
|
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 |