SourceForge.net Logo

XPath2Result.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2007
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2007
00005  *     Oracle. 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  * $Id: XPath2Result.hpp,v 1.12 2007/11/28 13:13:21 jpcs Exp $
00020  */
00021 
00022 #ifndef __XPATH2RESULT_HPP
00023 #define __XPATH2RESULT_HPP
00024 
00025 #include <xqilla/framework/XQillaExport.hpp>
00026 
00027 #include <xercesc/dom/DOMNode.hpp>
00028 #include <xercesc/dom/DOMTypeInfo.hpp>
00029 #include <xercesc/dom/DOMException.hpp>
00030 #include <xercesc/dom/DOMXPathException.hpp>
00031 
00039 class XQILLA_API XPath2Result
00040 {
00041 public:
00047   virtual ~XPath2Result() {};
00049 
00072   enum ResultType {
00073     FIRST_RESULT    = 100,
00074     ITERATOR_RESULT = 101,
00075     SNAPSHOT_RESULT = 102
00076   };
00078 
00081 
00087   virtual ResultType getResultType() const = 0;
00088 
00093   virtual bool isNode() const = 0;
00094 
00099   virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMTypeInfo *getTypeInfo() const = 0;
00100 
00112   virtual double asDouble() const = 0;
00113 
00122   virtual int asInt() const = 0;
00123 
00132   virtual const XMLCh* asString() const = 0;
00133 
00142   virtual bool asBoolean() const = 0;
00143 
00152   virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* asNode() const = 0;
00153 
00158   virtual bool getInvalidIteratorState() const = 0;
00159 
00167   virtual size_t getSnapshotLength() const = 0;
00168 
00179   virtual bool iterateNext() = 0;
00180 
00192   virtual bool snapshotItem(size_t) = 0;
00194 
00204   virtual void release() = 0;
00206 
00207 protected:
00210   XPath2Result() {};
00212 private:
00215   XPath2Result(const XPath2Result &);
00216   XPath2Result &operator=(const XPath2Result &);
00218 };
00219 
00220 #endif

Generated on Wed Dec 12 20:17:03 2007 for XQilla DOM Level 3 API by  doxygen 1.5.1