SaxonC 12.5
Saxon Processor library for C/C++, PHP and Python
|
#include <XdmAtomicValue.h>
Public Member Functions | |
XdmAtomicValue () | |
A default Constructor. | |
XdmAtomicValue (const XdmAtomicValue &other) | |
A copy constructor. | |
virtual | ~XdmAtomicValue () |
Destructor. | |
XdmAtomicValue (int64_t val) | |
A Java Wrapper Constructor. | |
XdmAtomicValue (int64_t val, const char *ty) | |
A Java Wrapper Constructor. | |
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 () |
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. | |
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 () |
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 | isFunction () |
virtual bool | isMap () |
virtual bool | isArray () |
virtual int64_t | getUnderlyingValue () |
const char * | toString () |
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 | |
Protected Member Functions inherited from XdmValue | |
void | initialize () |
initialize this XdmValue with default values | |
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 |
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 | ( | ) |
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 | ( | int64_t | val | ) |
A Java Wrapper Constructor.
Wrap a Java XdmAtomicValue object.
val | - Java XdmAtomicValue object |
XdmAtomicValue::XdmAtomicValue | ( | int64_t | 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 |