00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __XPATH2RESULT_HPP
00015 #define __XPATH2RESULT_HPP
00016
00017 #include <xqilla/framework/XQillaExport.hpp>
00018
00019 #include <xercesc/dom/DOMNode.hpp>
00020 #include <xercesc/dom/DOMTypeInfo.hpp>
00021 #include <xercesc/dom/DOMException.hpp>
00022 #include <xercesc/dom/DOMXPathException.hpp>
00023
00031 class XQILLA_API XPath2Result
00032 {
00033 public:
00039 virtual ~XPath2Result() {};
00041
00064 enum ResultType {
00065 FIRST_RESULT = 100,
00066 ITERATOR_RESULT = 101,
00067 SNAPSHOT_RESULT = 102
00068 };
00070
00073
00079 virtual ResultType getResultType() const = 0;
00080
00085 virtual bool isNode() const = 0;
00086
00091 virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMTypeInfo *getTypeInfo() const = 0;
00092
00104 virtual double asDouble() const = 0;
00105
00114 virtual int asInt() const = 0;
00115
00124 virtual const XMLCh* asString() const = 0;
00125
00134 virtual bool asBoolean() const = 0;
00135
00144 virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* asNode() const = 0;
00145
00150 virtual bool getInvalidIteratorState() const = 0;
00151
00159 virtual unsigned long getSnapshotLength() const = 0;
00160
00171 virtual bool iterateNext() = 0;
00172
00184 virtual bool snapshotItem(unsigned long index) = 0;
00186
00196 virtual void release() = 0;
00198
00199 protected:
00202 XPath2Result() {};
00204 private:
00207 XPath2Result(const XPath2Result &);
00208 XPath2Result &operator=(const XPath2Result &);
00210 };
00211
00212 #endif