SaxonC 12.5
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
XdmArray.h
1
2// Copyright (c) 2022 - 2023 Saxonica Limited.
3// This Source Code Form is subject to the terms of the Mozilla Public License,
4// v. 2.0. If a copy of the MPL was not distributed with this file, You can
5// obtain one at http://mozilla.org/MPL/2.0/. This Source Code Form is
6// "Incompatible With Secondary Licenses", as defined by the Mozilla Public
7// License, v. 2.0.
9
10#ifndef SAXON_XDM_ARRAY_h
11#define SAXON_XDM_ARRAY_h
12
13#include "XdmFunctionItem.h"
14#include <string>
15
16#include <set>
17#include <stdlib.h>
18#include <string.h>
19
26class XdmArray : public XdmFunctionItem {
27
28public:
30
33 XdmArray();
34
36
39 XdmArray(const XdmArray &d);
40
42
45 virtual ~XdmArray() {}
46
49
53 XdmArray(int64_t obj);
54
57
62 XdmArray(int64_t obj, int len);
63
65
71 int arrayLength();
72
84 XdmValue *get(int n);
85
97 XdmArray *put(int n, XdmValue *value);
98
107
116
121 std::list<XdmValue *> asList();
122
129 XdmValue **createXdmValueArray(int len) { return (new XdmValue *[len]); }
130
135 XdmValue **values();
136
143 int getArity() { return 1; }
144
146
152 const char *getStringValue();
153
160 bool isFunction() { return true; }
161
165 XDM_TYPE getType() { return XDM_ARRAY; }
166
168
173 bool isArray() { return true; }
174
177
201 const char *toString();
202
203private:
204 int arrayLen;
205};
206
207#endif
Definition XdmArray.h:26
virtual ~XdmArray()
Destructor.
Definition XdmArray.h:45
XdmArray * addMember(XdmValue *value)
Definition XdmArray.cpp:61
std::list< XdmValue * > asList()
Definition XdmArray.cpp:83
bool isFunction()
Definition XdmArray.h:160
XdmArray * concat(XdmArray *value)
Definition XdmArray.cpp:72
XdmArray * put(int n, XdmValue *value)
Definition XdmArray.cpp:47
XdmArray()
XdmArray default constructor.
Definition XdmArray.cpp:5
int arrayLength()
Get the number of members in the array.
Definition XdmArray.cpp:17
bool isArray()
Determine whether the item is an array or some other type of item.
Definition XdmArray.h:173
const char * getStringValue()
Get the string value of the XdmArray item.
Definition XdmArray.cpp:42
XDM_TYPE getType()
Definition XdmArray.h:165
XdmValue ** values()
Definition XdmArray.cpp:148
XdmValue * get(int n)
Definition XdmArray.cpp:25
int getArity()
Definition XdmArray.h:143
const char * toString()
Definition XdmArray.cpp:34
XdmValue ** createXdmValueArray(int len)
Definition XdmArray.h:129
Definition XdmFunctionItem.h:25
int64_t value
Definition XdmItem.h:170
Definition XdmValue.h:42