Saxon/C  1.2.1
Saxon Processor library for C/C++, PHP and Python
XdmAtomicValue.h
1 // Copyright (c) 2015 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_XDMATOMICVALUE_h
9 #define SAXON_XDMATOMICVALUE_h
10 
11 
12 #include "XdmItem.h"
13 #include <string>
14 
15 #include <stdlib.h>
16 #include <string.h>
17 //#include <dlfcn.h>
18 
19 
20 class XdmAtomicValue : public XdmItem {
21 
22 public:
23 
25 
27 
28 
29  virtual ~XdmAtomicValue(){
30  //std::cerr<<"destructor called fpr XdmAtomicValue"<<std::endl;
31  if(!valType.empty()) {
32  valType.clear();
33  }
34  }
35 
36  XdmAtomicValue(jobject);
37 
38  XdmAtomicValue(jobject, const char* ty);
39 
40  const char* getPrimitiveTypeName();
41 
42  bool getBooleanValue();
43 
44  double getDoubleValue();
45 
46  const char * getStringValue();
47 
48  long getLongValue();
49 
50  void setType(const char* ty);
51 
52 
53  bool isAtomic(){
54  return true;
55  }
56 
60  XDM_TYPE getType() {
61  return XDM_ATOMIC_VALUE;
62  }
63 
64 
65 private:
66 
67  std::string valType;
68 
69 
70 };
71 
72 
73 
74 
75 #endif
XDM_TYPE getType()
Definition: XdmAtomicValue.h:60
Definition: XdmAtomicValue.h:20
const char * getStringValue()
Definition: XdmAtomicValue.cpp:103
Definition: XdmItem.h:15