SourceForge.net Logo

XPath2Result.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001, 2008,
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004, 2011,
00005  *     Oracle and/or its affiliates. All rights reserved.
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 #ifndef __XPATH2RESULT_HPP
00021 #define __XPATH2RESULT_HPP
00022 
00023 #include <xqilla/framework/XQillaExport.hpp>
00024 
00025 #include <xercesc/dom/DOMNode.hpp>
00026 #include <xercesc/dom/DOMTypeInfo.hpp>
00027 #include <xercesc/dom/DOMException.hpp>
00028 #include <xercesc/dom/DOMXPathException.hpp>
00029 
00037 class XQILLA_API XPath2Result
00038 {
00039 public:
00045   virtual ~XPath2Result() {};
00047 
00070   enum ResultType {
00071     FIRST_RESULT    = 100,
00072     ITERATOR_RESULT = 101,
00073     SNAPSHOT_RESULT = 102
00074   };
00076 
00079 
00085   virtual ResultType getResultType() const = 0;
00086 
00091   virtual bool isNode() const = 0;
00092 
00097   virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMTypeInfo *getTypeInfo() const = 0;
00098 
00110   virtual double getNumberValue() const = 0;
00111 
00120   virtual int getIntegerValue() const = 0;
00121 
00130   virtual const XMLCh* getStringValue() const = 0;
00131 
00140   virtual bool getBooleanValue() const = 0;
00141 
00150   virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* getNodeValue() const = 0;
00151 
00156   virtual bool getInvalidIteratorState() const = 0;
00157 
00165   virtual size_t getSnapshotLength() const = 0;
00166 
00177   virtual bool iterateNext() = 0;
00178 
00190   virtual bool snapshotItem(size_t) = 0;
00192 
00202   virtual void release() = 0;
00204 
00205 protected:
00208   XPath2Result() {};
00210 private:
00213   XPath2Result(const XPath2Result &);
00214   XPath2Result &operator=(const XPath2Result &);
00216 };
00217 
00218 #endif