1 | /* |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
3 | * contributor license agreements. See the NOTICE file distributed with |
---|
4 | * this work for additional information regarding copyright ownership. |
---|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
6 | * (the "License"); you may not use this file except in compliance with |
---|
7 | * the License. You may obtain a copy of the License at |
---|
8 | * |
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | * |
---|
11 | * Unless required by applicable law or agreed to in writing, software |
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | * See the License for the specific language governing permissions and |
---|
15 | * limitations under the License. |
---|
16 | */ |
---|
17 | |
---|
18 | /* |
---|
19 | * $Id: DOM_RangeException.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef DOM_RangeException_HEADER_GUARD_ |
---|
23 | #define DOM_RangeException_HEADER_GUARD_ |
---|
24 | |
---|
25 | #include "DOM_DOMException.hpp" |
---|
26 | |
---|
27 | XERCES_CPP_NAMESPACE_BEGIN |
---|
28 | |
---|
29 | |
---|
30 | /** |
---|
31 | * Encapsulate range related DOM error or warning. DOM level 2 implementation. |
---|
32 | * |
---|
33 | * <p> The DOM will create and throw an instance of DOM_RangeException |
---|
34 | * when an error condition in range is detected. Exceptions can occur |
---|
35 | * when an application directly manipulates the range elements in DOM document |
---|
36 | * tree that is produced by the parser. |
---|
37 | * |
---|
38 | * <p>Unlike the other classes in the C++ DOM API, DOM_RangeException |
---|
39 | * is NOT a reference to an underlying implementation class, and |
---|
40 | * does not provide automatic memory management. Code that catches |
---|
41 | * a DOM Range exception is responsible for deleting it, or otherwise |
---|
42 | * arranging for its disposal. |
---|
43 | * |
---|
44 | */ |
---|
45 | class DEPRECATED_DOM_EXPORT DOM_RangeException : public DOM_DOMException { |
---|
46 | public: |
---|
47 | /** @name Enumerators for DOM Range Exceptions */ |
---|
48 | //@{ |
---|
49 | enum RangeExceptionCode { |
---|
50 | BAD_BOUNDARYPOINTS_ERR = 1, |
---|
51 | INVALID_NODE_TYPE_ERR = 2 |
---|
52 | }; |
---|
53 | //@} |
---|
54 | public: |
---|
55 | /** @name Constructors and assignment operator */ |
---|
56 | //@{ |
---|
57 | /** |
---|
58 | * Default constructor for DOM_RangeException. |
---|
59 | * |
---|
60 | */ |
---|
61 | DOM_RangeException(); |
---|
62 | |
---|
63 | /** |
---|
64 | * Constructor which takes an error code and a message. |
---|
65 | * |
---|
66 | * @param code The error code which indicates the exception |
---|
67 | * @param message The string containing the error message |
---|
68 | */ |
---|
69 | DOM_RangeException(RangeExceptionCode code, const DOMString &message); |
---|
70 | |
---|
71 | /** |
---|
72 | * Copy constructor. |
---|
73 | * |
---|
74 | * @param other The object to be copied. |
---|
75 | */ |
---|
76 | DOM_RangeException(const DOM_RangeException &other); |
---|
77 | |
---|
78 | //@} |
---|
79 | /** @name Destructor. */ |
---|
80 | //@{ |
---|
81 | /** |
---|
82 | * Destructor for DOM_RangeException. Applications are responsible |
---|
83 | * for deleting DOM_RangeException objects that they catch after they |
---|
84 | * have completed their exception processing. |
---|
85 | * |
---|
86 | */ |
---|
87 | virtual ~DOM_RangeException(); |
---|
88 | //@} |
---|
89 | |
---|
90 | /** @name Public variables. */ |
---|
91 | //@{ |
---|
92 | /** |
---|
93 | * A code value, from the set defined by the RangeExceptionCode enum, |
---|
94 | * indicating the type of error that occured. |
---|
95 | */ |
---|
96 | RangeExceptionCode code; |
---|
97 | |
---|
98 | //@} |
---|
99 | |
---|
100 | }; |
---|
101 | |
---|
102 | XERCES_CPP_NAMESPACE_END |
---|
103 | |
---|
104 | #endif |
---|
105 | |
---|