SaxonC 12.4
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
XdmAtomicValue.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_XDMATOMICVALUE_h
11#define SAXON_XDMATOMICVALUE_h
12
13#include "XdmItem.h"
14#include <string>
15
16#include <stdlib.h>
17#include <string.h>
18
26class XdmAtomicValue : public XdmItem {
27
28public:
30
34
36
40 XdmAtomicValue(const XdmAtomicValue &other);
41
43
46 virtual ~XdmAtomicValue();
47
49
53 XdmAtomicValue(int64_t val);
54
56
61 XdmAtomicValue(int64_t val, const char *ty);
62
64
73 const char *getPrimitiveTypeName();
74
76
84 bool getBooleanValue();
85
87
97 double getDoubleValue();
98
100
111 const char *getStringValue();
112
114
121 long getLongValue();
122
124
128 void setType(const char *ty);
129
131
135 XdmItem *getHead();
136
138
144 bool isAtomic() { return true; }
145
147
151 int getHashCode();
152
156 XDM_TYPE getType() { return XDM_ATOMIC_VALUE; }
157
158private:
159 std::string valType;
160};
161
162#endif
Definition XdmAtomicValue.h:26
const char * getStringValue()
Get the string value of the item.
Definition XdmAtomicValue.cpp:65
void setType(const char *ty)
Set the type annotation of the atomic value.
Definition XdmAtomicValue.cpp:28
virtual ~XdmAtomicValue()
Destructor.
Definition XdmAtomicValue.cpp:20
int getHashCode()
Get a hashcode that reflects the rules for equality matching.
Definition XdmAtomicValue.cpp:53
double getDoubleValue()
Get the value converted to a double using the XPath casting rules.
Definition XdmAtomicValue.cpp:59
XdmAtomicValue()
A default Constructor.
Definition XdmAtomicValue.cpp:6
const char * getPrimitiveTypeName()
Get the primitive type of this atomic value, as a QName.
Definition XdmAtomicValue.cpp:30
bool isAtomic()
Determine whether the item is an atomic value or some other type of item.
Definition XdmAtomicValue.h:144
bool getBooleanValue()
Get the value converted to a boolean using the XPath casting rules.
Definition XdmAtomicValue.cpp:47
XdmItem * getHead()
Get the first item in the sequence.
Definition XdmAtomicValue.cpp:12
long getLongValue()
Get the value converted to an integer using the XPath casting rules.
Definition XdmAtomicValue.cpp:69
XDM_TYPE getType()
Definition XdmAtomicValue.h:156
Definition XdmItem.h:30