# DOMXPathResult.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: DOMXPathResult.hpp 698579 2008-09-24 14:13:08Z borisk $
    00020  */
    00021
    00022 #if !defined(XERCESC_INCLUDE_GUARD_DOMXPATHRESULT_HPP)
    00023 #define XERCESC_INCLUDE_GUARD_DOMXPATHRESULT_HPP
    00024
    00025 #include <xercesc/util/XercesDefs.hpp>
    00026
    00027 XERCES_CPP_NAMESPACE_BEGIN
    00028
    00029 class DOMXPathNSResolver;
    00030 class DOMXPathExpression;
    00031 class DOMTypeInfo;
    00032 class DOMNode;
    00033
    00046 class CDOM_EXPORT DOMXPathResult
    00047 {
    00048
    00049 protected:
    00050     // -----------------------------------------------------------------------
    00051     //  Hidden constructors
    00052     // -----------------------------------------------------------------------
    00055     DOMXPathResult() {};
    00057
    00058 private:
    00059     // -----------------------------------------------------------------------
    00060     // Unimplemented constructors and operators
    00061     // -----------------------------------------------------------------------
    00064     DOMXPathResult(const DOMXPathResult &);
    00065     DOMXPathResult& operator = (const  DOMXPathResult&);
    00067
    00068 public:
    00069     // -----------------------------------------------------------------------
    00070     //  All constructors are hidden, just the destructor is available
    00071     // -----------------------------------------------------------------------
    00078     virtual ~DOMXPathResult() {};
    00080
    00081     // -----------------------------------------------------------------------
    00082     //  Class Types
    00083     // -----------------------------------------------------------------------
    00163     enum ResultType {
    00164                 /* XPath 1.0 */
    00165                 ANY_TYPE = 0,
    00166                 NUMBER_TYPE = 1,
    00167                 STRING_TYPE = 2,
    00168                 BOOLEAN_TYPE = 3,
    00169                 UNORDERED_NODE_ITERATOR_TYPE = 4,
    00170                 ORDERED_NODE_ITERATOR_TYPE = 5,
    00171                 UNORDERED_NODE_SNAPSHOT_TYPE = 6,
    00172                 ORDERED_NODE_SNAPSHOT_TYPE = 7,
    00173                 ANY_UNORDERED_NODE_TYPE = 8,
    00174                 FIRST_ORDERED_NODE_TYPE = 9,
    00175                 /* XPath 2.0 */
    00176                 FIRST_RESULT_TYPE    = 100,
    00177                 ITERATOR_RESULT_TYPE = 101,
    00178                 SNAPSHOT_RESULT_TYPE = 102
    00179     };
    00181
    00182
    00183     // -----------------------------------------------------------------------
    00184     // Virtual DOMXPathResult interface
    00185     // -----------------------------------------------------------------------
    00188
    00194     virtual ResultType getResultType() const = 0;
    00195
    00201     virtual const DOMTypeInfo *getTypeInfo() const = 0;
    00202
    00210     virtual bool isNode() const = 0;
    00211
    00222     virtual bool getBooleanValue() const = 0;
    00223
    00234     virtual int getIntegerValue() const = 0;
    00235
    00249     virtual double getNumberValue() const = 0;
    00250
    00261     virtual const XMLCh* getStringValue() const = 0;
    00262
    00277     virtual DOMNode* getNodeValue() const = 0;
    00278
    00291     virtual bool iterateNext() = 0;
    00292
    00304     virtual bool getInvalidIteratorState() const = 0;
    00305
    00319     virtual bool snapshotItem(XMLSize_t index) = 0;
    00320
    00330     virtual XMLSize_t getSnapshotLength() const = 0;
    00331
    00333
    00334     // -----------------------------------------------------------------------
    00335     //  Non-standard Extension
    00336     // -----------------------------------------------------------------------
    00345     virtual void release() = 0;
    00347 };
    00348
    00349 XERCES_CPP_NAMESPACE_END
    00350
    00351 #endif