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