source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/DOMXPathExpression.hpp @ 2674

Revision 2674, 4.7 KB checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef DOMXPathExpression_HEADER_GUARD_
2#define DOMXPathExpression_HEADER_GUARD_
3
4/*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements.  See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License.  You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#include <xercesc/util/XercesDefs.hpp>
22
23XERCES_CPP_NAMESPACE_BEGIN
24
25class DOMNode;
26/**
27 * The <code>DOMXPathExpression</code> interface represents a parsed and resolved XPath expression.
28 * @since DOM Level 3
29 */
30class CDOM_EXPORT DOMXPathExpression
31{
32
33protected:
34    // -----------------------------------------------------------------------
35    //  Hidden constructors
36    // -----------------------------------------------------------------------
37    /** @name Hidden constructors */
38    //@{   
39    DOMXPathExpression() {};
40    //@}
41
42private:
43    // -----------------------------------------------------------------------
44    // Unimplemented constructors and operators
45    // -----------------------------------------------------------------------
46    /** @name Unimplemented constructors and operators */
47    //@{
48    DOMXPathExpression(const DOMXPathExpression &);
49    DOMXPathExpression& operator = (const  DOMXPathExpression&);
50    //@}
51
52public:
53    // -----------------------------------------------------------------------
54    //  All constructors are hidden, just the destructor is available
55    // -----------------------------------------------------------------------
56    /** @name Destructor */
57    //@{
58    /**
59     * Destructor
60     *
61     */
62    virtual ~DOMXPathExpression() {};
63    //@}
64
65    // -----------------------------------------------------------------------
66    // Virtual DOMDocument interface
67    // -----------------------------------------------------------------------
68    /** @name Functions introduced in DOM Level 3 */
69    //@{ 
70
71    /**
72     * Evaluates this XPath expression and returns a result.
73     * @param contextNode of type <code>DOMNode</code> The context is context
74     * node for the evaluation of this XPath expression.
75     * If the XPathEvaluator was obtained by casting the Document then this must
76     * be owned by the same document and must be a <code>DOMDocument</code>, <code>DOMElement</code>,
77     * <code>DOMAttribute</code>, <code>DOMText</code>, <code>DOMCDATASection</code>,
78     * <code>DOMComment</code>, <code>DOMProcessingInstruction</code>, or
79     * <code>XPathNamespace</code>. If the context node is a <code>DOMText</code> or a
80     * <code>DOMCDATASection</code>, then the context is interpreted as the whole logical
81     * text node as seen by XPath, unless the node is empty in which case it may not
82     * serve as the XPath context.
83     * @param type of type unsigned short If a specific type is specified, then the result
84     * will be coerced to return the specified type relying on XPath conversions and fail
85     * if the desired coercion is not possible. This must be one of the type codes of <code>XPathResult</code>.
86     * @param result of type void* The result specifies a specific result object which
87     * may be reused and returned by this method. If this is specified as nullor the
88     * implementation does not reuse the specified result, a new result object will be constructed
89     * and returned.
90     * For XPath 1.0 results, this object will be of type <code>XPathResult</code>.
91     * @return void* The result of the evaluation of the XPath expression.
92     * For XPath 1.0 results, this object will be of type <code>XPathResult</code>.
93     * @exception <code>XPathException</code>
94     * TYPE_ERR: Raised if the result cannot be converted to return the specified type.
95     * @exception <code>DOMException</code>
96     * WRONG_DOCUMENT_ERR: The <code>DOMNode</code> is from a document that is not supported by
97     * the <code>XPathEvaluator</code> that created this <code>DOMXPathExpression</code>.
98     * NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath context node or the
99     * request type is not permitted by this <code>DOMXPathExpression</code>.
100     */
101
102    virtual void*          evaluate(DOMNode *contextNode, unsigned short type, void* result) const = 0;
103    //@}
104};
105
106XERCES_CPP_NAMESPACE_END
107
108#endif
Note: See TracBrowser for help on using the repository browser.