1 | #ifndef DOMErrorHandler_HEADER_GUARD_ |
---|
2 | #define DOMErrorHandler_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 | /* |
---|
22 | * $Id: DOMErrorHandler.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
23 | */ |
---|
24 | |
---|
25 | |
---|
26 | #include <xercesc/util/XercesDefs.hpp> |
---|
27 | |
---|
28 | XERCES_CPP_NAMESPACE_BEGIN |
---|
29 | |
---|
30 | |
---|
31 | class DOMError; |
---|
32 | |
---|
33 | /** |
---|
34 | * Basic interface for DOM error handlers. |
---|
35 | * |
---|
36 | * <p>DOMErrorHandler is a callback interface that the DOM implementation |
---|
37 | * can call when reporting errors that happens while processing XML data, or |
---|
38 | * when doing some other processing (e.g. validating a document).</p> |
---|
39 | * |
---|
40 | * <p>The application that is using the DOM implementation is expected to |
---|
41 | * implement this interface.</p> |
---|
42 | * |
---|
43 | * @see DOMBuilder#setErrorHandler |
---|
44 | * @since DOM Level 3 |
---|
45 | */ |
---|
46 | |
---|
47 | class CDOM_EXPORT DOMErrorHandler |
---|
48 | { |
---|
49 | protected: |
---|
50 | // ----------------------------------------------------------------------- |
---|
51 | // Hidden constructors |
---|
52 | // ----------------------------------------------------------------------- |
---|
53 | /** @name Hidden constructors */ |
---|
54 | //@{ |
---|
55 | DOMErrorHandler() {}; |
---|
56 | //@} |
---|
57 | |
---|
58 | private: |
---|
59 | // ----------------------------------------------------------------------- |
---|
60 | // Unimplemented constructors and operators |
---|
61 | // ----------------------------------------------------------------------- |
---|
62 | /** @name Unimplemented constructors and operators */ |
---|
63 | //@{ |
---|
64 | DOMErrorHandler(const DOMErrorHandler &); |
---|
65 | DOMErrorHandler & operator = (const DOMErrorHandler &); |
---|
66 | //@} |
---|
67 | |
---|
68 | public: |
---|
69 | // ----------------------------------------------------------------------- |
---|
70 | // All constructors are hidden, just the destructor is available |
---|
71 | // ----------------------------------------------------------------------- |
---|
72 | /** @name Destructor */ |
---|
73 | //@{ |
---|
74 | /** |
---|
75 | * Destructor |
---|
76 | * |
---|
77 | */ |
---|
78 | virtual ~DOMErrorHandler() {}; |
---|
79 | //@} |
---|
80 | |
---|
81 | // ----------------------------------------------------------------------- |
---|
82 | // Virtual DOMErrorHandler interface |
---|
83 | // ----------------------------------------------------------------------- |
---|
84 | /** @name Functions introduced in DOM Level 3 */ |
---|
85 | //@{ |
---|
86 | /** |
---|
87 | * This method is called on the error handler when an error occures. |
---|
88 | * |
---|
89 | * <p><b>"Experimental - subject to change"</b></p> |
---|
90 | * |
---|
91 | * @param domError The error object that describes the error, this object |
---|
92 | * may be reused by the DOM implementation across multiple |
---|
93 | * calls to the handleEvent method. |
---|
94 | * @return If the handleError method returns <code>true</code> the DOM |
---|
95 | * implementation should continue as if the error didn't happen |
---|
96 | * when possible, if the method returns <code>false</code> then the |
---|
97 | * DOM implementation should stop the current processing when |
---|
98 | * possible. |
---|
99 | * |
---|
100 | * @since DOM Level 3 |
---|
101 | */ |
---|
102 | virtual bool handleError(const DOMError& domError) = 0; |
---|
103 | //@} |
---|
104 | |
---|
105 | }; |
---|
106 | |
---|
107 | XERCES_CPP_NAMESPACE_END |
---|
108 | |
---|
109 | #endif |
---|