SaxonC  11.6
Saxon Processor library for C/C++, PHP and Python
XdmItem.h
1 // Copyright (c) 2022 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
7 
8 #ifndef SAXON_XDMITEM_h
9 #define SAXON_XDMITEM_h
10 
11 #include "XdmValue.h"
12 
13 class SaxonProcessor;
14 
28 class XdmItem : public XdmValue
29 {
30 
31 public:
32 
34 
37  XdmItem();
38 
40 
44  explicit XdmItem(jobject);
45 
46 
48 
51  XdmItem(const XdmItem &item);
52 
54 
57  virtual ~XdmItem();
58 
60 
63  virtual void incrementRefCount();
64 
66 
69  virtual void decrementRefCount();
70 
76  virtual bool isAtomic();
77 
78 
84  virtual bool isNode();
85 
91  virtual bool isFunction();
92 
98  virtual bool isMap();
99 
105  virtual bool isArray();
106 
111  virtual jobject getUnderlyingValue();
112 
113 
114 
127  virtual const char * getStringValue();
128 
129  const char * toString();
130 
135  virtual XdmItem * getHead();
136 
147  XdmItem * itemAt(int n);
148 
153  int size();
154 
155 
156 
160  virtual XDM_TYPE getType();
161 
162  protected:
163  jobject value;
164  std::string stringValue;
165 };
166 
167 
168 #endif
The SaxonProcessor class acts as a factory for generating XQuery, XPath, Schema and XSLT compilers.
Definition: SaxonProcessor.h:119
Definition: XdmItem.h:29
virtual bool isNode()
Definition: XdmItem.cpp:29
virtual bool isFunction()
Definition: XdmItem.cpp:34
XdmItem * itemAt(int n)
Definition: XdmItem.cpp:53
const char * toString()
Create a string representation of the value.
Definition: XdmItem.cpp:109
virtual jobject getUnderlyingValue()
Definition: XdmItem.cpp:66
virtual XDM_TYPE getType()
Definition: XdmItem.cpp:133
virtual bool isMap()
Definition: XdmItem.cpp:39
virtual bool isArray()
Definition: XdmItem.cpp:44
int size()
Definition: XdmItem.cpp:62
XdmItem()
XdmItem default constructor.
Definition: XdmItem.cpp:5
virtual void incrementRefCount()
Increment reference count of this XdmItem - Memory management - Internal use only.
Definition: XdmItem.cpp:150
virtual XdmItem * getHead()
Definition: XdmItem.cpp:50
virtual void decrementRefCount()
Decrement reference count of this XdmItem - Memory management - Internal use only.
Definition: XdmItem.cpp:155
virtual ~XdmItem()
Destructor.
Definition: XdmItem.cpp:137
virtual bool isAtomic()
Definition: XdmItem.cpp:23
virtual const char * getStringValue()
Definition: XdmItem.cpp:79
std::string stringValue
Definition: XdmItem.h:164
jobject value
Definition: XdmItem.h:163
Definition: XdmValue.h:50