SourceForge.net Logo
XPath2Result.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001, 2008,
3  * DecisionSoft Limited. All rights reserved.
4  * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef __XPATH2RESULT_HPP
21 #define __XPATH2RESULT_HPP
22 
23 #include <xqilla/framework/XQillaExport.hpp>
24 
25 #include <xercesc/dom/DOMNode.hpp>
29 
37 class XQILLA_API XPath2Result
38 {
39 public:
45  virtual ~XPath2Result() {};
47 
70  enum ResultType {
71  FIRST_RESULT = 100,
72  ITERATOR_RESULT = 101,
73  SNAPSHOT_RESULT = 102
74  };
76 
79 
85  virtual ResultType getResultType() const = 0;
86 
91  virtual bool isNode() const = 0;
92 
97  virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMTypeInfo *getTypeInfo() const = 0;
98 
110  virtual double getNumberValue() const = 0;
111 
120  virtual int getIntegerValue() const = 0;
121 
130  virtual const XMLCh* getStringValue() const = 0;
131 
140  virtual bool getBooleanValue() const = 0;
141 
150  virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* getNodeValue() const = 0;
151 
156  virtual bool getInvalidIteratorState() const = 0;
157 
165  virtual size_t getSnapshotLength() const = 0;
166 
177  virtual bool iterateNext() = 0;
178 
190  virtual bool snapshotItem(size_t) = 0;
192 
202  virtual void release() = 0;
204 
205 protected:
210 private:
213  XPath2Result(const XPath2Result &);
214  XPath2Result &operator=(const XPath2Result &);
216 };
217 
218 #endif
The XPathResult2 interface represents the result of the evaluation of an XPath 2.0 expression within ...
Definition: XPath2Result.hpp:38
virtual bool getInvalidIteratorState() const =0
Signifies that the iterator has become invalid.
ResultType
Definition: XPath2Result.hpp:70
XPath2Result()
Definition: XPath2Result.hpp:208
virtual double getNumberValue() const =0
Conversion of the current result to double.
virtual int getIntegerValue() const =0
Conversion of the current result to int.
virtual size_t getSnapshotLength() const =0
The number of items in the result snapshot.
virtual void release()=0
Called to indicate that this object (and its associated children) is no longer in use and that the im...
virtual bool snapshotItem(size_t)=0
Sets the current result to the indexth item in the snapshot collection.
virtual xercesc::DOMNode * getNodeValue() const =0
Retrieve the current node value.
virtual bool getBooleanValue() const =0
Conversion of the current result to boolean.
virtual bool isNode() const =0
Returns true if the result has a current result and the value is a node.
virtual ResultType getResultType() const =0
Returns the result type of this result.
virtual bool iterateNext()=0
Iterates and returns true if the current result is the next item from the sequence or false if there ...
virtual ~XPath2Result()
Destructor.
Definition: XPath2Result.hpp:45
virtual const xercesc::DOMTypeInfo * getTypeInfo() const =0
Returns the DOM type info of the current result node or value.
virtual const XMLCh * getStringValue() const =0
Conversion of the current result to string.