[2674] | 1 | #ifndef DOMRangeException_HEADER_GUARD_ |
---|
| 2 | #define DOMRangeException_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: DOMRangeException.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
| 23 | */ |
---|
| 24 | |
---|
| 25 | #include <xercesc/dom/DOMException.hpp> |
---|
| 26 | |
---|
| 27 | XERCES_CPP_NAMESPACE_BEGIN |
---|
| 28 | |
---|
| 29 | /** |
---|
| 30 | * Range operations may throw a <code>DOMRangeException</code> as specified in |
---|
| 31 | * their method descriptions. |
---|
| 32 | * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>. |
---|
| 33 | * @since DOM Level 2 |
---|
| 34 | */ |
---|
| 35 | |
---|
| 36 | class CDOM_EXPORT DOMRangeException : public DOMException { |
---|
| 37 | public: |
---|
| 38 | // ----------------------------------------------------------------------- |
---|
| 39 | // Class Types |
---|
| 40 | // ----------------------------------------------------------------------- |
---|
| 41 | /** @name Public Contants */ |
---|
| 42 | //@{ |
---|
| 43 | /** |
---|
| 44 | * Enumerators for DOM Range Exceptions |
---|
| 45 | * |
---|
| 46 | * <p><code>BAD_BOUNDARYPOINTS_ERR:</code> |
---|
| 47 | * If the boundary-points of a Range do not meet specific requirements.</p> |
---|
| 48 | * |
---|
| 49 | * <p><code>INVALID_NODE_TYPE_ERR:</code> |
---|
| 50 | * If the container of an boundary-point of a Range is being set to either |
---|
| 51 | * a node of an invalid type or a node with an ancestor of an invalid |
---|
| 52 | * type.</p> |
---|
| 53 | * |
---|
| 54 | * @since DOM Level 2 |
---|
| 55 | */ |
---|
| 56 | enum RangeExceptionCode { |
---|
| 57 | BAD_BOUNDARYPOINTS_ERR = 1, |
---|
| 58 | INVALID_NODE_TYPE_ERR = 2 |
---|
| 59 | }; |
---|
| 60 | //@} |
---|
| 61 | |
---|
| 62 | public: |
---|
| 63 | // ----------------------------------------------------------------------- |
---|
| 64 | // Constructors |
---|
| 65 | // ----------------------------------------------------------------------- |
---|
| 66 | /** @name Constructors */ |
---|
| 67 | //@{ |
---|
| 68 | /** |
---|
| 69 | * Default constructor for DOMRangeException. |
---|
| 70 | * |
---|
| 71 | */ |
---|
| 72 | DOMRangeException(); |
---|
| 73 | |
---|
| 74 | /** |
---|
| 75 | * Constructor which takes an error code and a message. |
---|
| 76 | * |
---|
| 77 | * @param code The error code which indicates the exception |
---|
| 78 | * @param message The string containing the error message |
---|
| 79 | * @param memoryManager The memory manager used to (de)allocate memory |
---|
| 80 | */ |
---|
| 81 | DOMRangeException( |
---|
| 82 | RangeExceptionCode code |
---|
| 83 | , const XMLCh* message |
---|
| 84 | , MemoryManager* const memoryManager |
---|
| 85 | ); |
---|
| 86 | |
---|
| 87 | /** |
---|
| 88 | * Copy constructor. |
---|
| 89 | * |
---|
| 90 | * @param other The object to be copied. |
---|
| 91 | */ |
---|
| 92 | DOMRangeException(const DOMRangeException &other); |
---|
| 93 | //@} |
---|
| 94 | |
---|
| 95 | // ----------------------------------------------------------------------- |
---|
| 96 | // Destructors |
---|
| 97 | // ----------------------------------------------------------------------- |
---|
| 98 | /** @name Destructor. */ |
---|
| 99 | //@{ |
---|
| 100 | /** |
---|
| 101 | * Destructor for DOMRangeException. |
---|
| 102 | * |
---|
| 103 | */ |
---|
| 104 | virtual ~DOMRangeException(); |
---|
| 105 | //@} |
---|
| 106 | |
---|
| 107 | public: |
---|
| 108 | // ----------------------------------------------------------------------- |
---|
| 109 | // Class Types |
---|
| 110 | // ----------------------------------------------------------------------- |
---|
| 111 | /** @name Public variables */ |
---|
| 112 | //@{ |
---|
| 113 | /** |
---|
| 114 | * A code value, from the set defined by the RangeExceptionCode enum, |
---|
| 115 | * indicating the type of error that occured. |
---|
| 116 | * |
---|
| 117 | * @since DOM Level 2 |
---|
| 118 | */ |
---|
| 119 | RangeExceptionCode code; |
---|
| 120 | |
---|
| 121 | //@} |
---|
| 122 | |
---|
| 123 | private: |
---|
| 124 | // ----------------------------------------------------------------------- |
---|
| 125 | // Unimplemented constructors and operators |
---|
| 126 | // ----------------------------------------------------------------------- |
---|
| 127 | DOMRangeException & operator = (const DOMRangeException &); |
---|
| 128 | }; |
---|
| 129 | |
---|
| 130 | XERCES_CPP_NAMESPACE_END |
---|
| 131 | |
---|
| 132 | #endif |
---|
| 133 | |
---|