source: NonGTP/Xerces/xerces/include/xercesc/dom/DOMXPathExpression.hpp @ 358

Revision 358, 4.6 KB checked in by bittner, 19 years ago (diff)

xerces added

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