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-2008
5  * Oracle. All rights reserved.
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  * $Id$
20  */
21 
22 #ifndef __XPATH2RESULT_HPP
23 #define __XPATH2RESULT_HPP
24 
25 #include <xqilla/framework/XQillaExport.hpp>
26 
27 #include <xercesc/dom/DOMNode.hpp>
31 
39 class XQILLA_API XPath2Result
40 {
41 public:
47  virtual ~XPath2Result() {};
49 
72  enum ResultType {
73  FIRST_RESULT = 100,
74  ITERATOR_RESULT = 101,
75  SNAPSHOT_RESULT = 102
76  };
78 
81 
87  virtual ResultType getResultType() const = 0;
88 
93  virtual bool isNode() const = 0;
94 
99  virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMTypeInfo *getTypeInfo() const = 0;
100 
112  virtual double getNumberValue() const = 0;
113 
122  virtual int getIntegerValue() const = 0;
123 
132  virtual const XMLCh* getStringValue() const = 0;
133 
142  virtual bool getBooleanValue() const = 0;
143 
152  virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* getNodeValue() const = 0;
153 
158  virtual bool getInvalidIteratorState() const = 0;
159 
167  virtual size_t getSnapshotLength() const = 0;
168 
179  virtual bool iterateNext() = 0;
180 
192  virtual bool snapshotItem(size_t) = 0;
194 
204  virtual void release() = 0;
206 
207 protected:
212 private:
215  XPath2Result(const XPath2Result &);
216  XPath2Result &operator=(const XPath2Result &);
218 };
219 
220 #endif