|
||||
File indexing completed on 2025-01-30 10:27:03
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMXPATHEXPRESSION_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMXPATHEXPRESSION_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 #include <xercesc/dom/DOMXPathResult.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 class DOMNode; 0031 0032 /** 0033 * The <code>DOMXPathExpression</code> interface represents a parsed and resolved XPath expression. 0034 * @since DOM Level 3 0035 */ 0036 class CDOM_EXPORT DOMXPathExpression 0037 { 0038 0039 protected: 0040 // ----------------------------------------------------------------------- 0041 // Hidden constructors 0042 // ----------------------------------------------------------------------- 0043 /** @name Hidden constructors */ 0044 //@{ 0045 DOMXPathExpression() {}; 0046 //@} 0047 0048 private: 0049 // ----------------------------------------------------------------------- 0050 // Unimplemented constructors and operators 0051 // ----------------------------------------------------------------------- 0052 /** @name Unimplemented constructors and operators */ 0053 //@{ 0054 DOMXPathExpression(const DOMXPathExpression &); 0055 DOMXPathExpression& operator = (const DOMXPathExpression&); 0056 //@} 0057 0058 public: 0059 // ----------------------------------------------------------------------- 0060 // All constructors are hidden, just the destructor is available 0061 // ----------------------------------------------------------------------- 0062 /** @name Destructor */ 0063 //@{ 0064 /** 0065 * Destructor 0066 * 0067 */ 0068 virtual ~DOMXPathExpression() {}; 0069 //@} 0070 0071 // ----------------------------------------------------------------------- 0072 // Virtual DOMXPathExpression interface 0073 // ----------------------------------------------------------------------- 0074 /** @name Functions introduced in DOM Level 3 */ 0075 //@{ 0076 0077 /** 0078 * Evaluates this XPath expression and returns a result. 0079 * @param contextNode of type <code>DOMNode</code> The context is context 0080 * node for the evaluation of this XPath expression. 0081 * If the XPathEvaluator was obtained by casting the Document then this must 0082 * be owned by the same document and must be a <code>DOMDocument</code>, <code>DOMElement</code>, 0083 * <code>DOMAttribute</code>, <code>DOMText</code>, <code>DOMCDATASection</code>, 0084 * <code>DOMComment</code>, <code>DOMProcessingInstruction</code>, or 0085 * <code>XPathNamespace</code>. If the context node is a <code>DOMText</code> or a 0086 * <code>DOMCDATASection</code>, then the context is interpreted as the whole logical 0087 * text node as seen by XPath, unless the node is empty in which case it may not 0088 * serve as the XPath context. 0089 * @param type If a specific type is specified, then the result 0090 * will be coerced to return the specified type relying on XPath conversions and fail 0091 * if the desired coercion is not possible. This must be one of the type codes of <code>DOMXPathResult</code>. 0092 * @param result of type DOMXPathResult* The result specifies a specific result object which 0093 * may be reused and returned by this method. If this is specified as nullor the 0094 * implementation does not reuse the specified result, a new result object will be constructed 0095 * and returned. 0096 * @return DOMXPathResult* The result of the evaluation of the XPath expression. 0097 * @exception <code>DOMXPathException</code> 0098 * TYPE_ERR: Raised if the result cannot be converted to return the specified type. 0099 * @exception <code>DOMException</code> 0100 * WRONG_DOCUMENT_ERR: The <code>DOMNode</code> is from a document that is not supported by 0101 * the <code>XPathEvaluator</code> that created this <code>DOMXPathExpression</code>. 0102 * NOT_SUPPORTED_ERR: The DOMNode is not a type permitted as an XPath context node or the 0103 * request type is not permitted by this <code>DOMXPathExpression</code>. 0104 */ 0105 0106 virtual DOMXPathResult* evaluate(const DOMNode *contextNode, 0107 DOMXPathResult::ResultType type, 0108 DOMXPathResult* result) const = 0; 0109 //@} 0110 0111 // ----------------------------------------------------------------------- 0112 // Non-standard Extension 0113 // ----------------------------------------------------------------------- 0114 /** @name Non-standard Extension */ 0115 //@{ 0116 /** 0117 * Called to indicate that this DOMXPathExpression is no longer in use 0118 * and that the implementation may relinquish any resources associated with it. 0119 * 0120 * Access to a released object will lead to unexpected result. 0121 */ 0122 virtual void release() = 0; 0123 //@} 0124 0125 }; 0126 0127 XERCES_CPP_NAMESPACE_END 0128 0129 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |