00001 #ifndef DOMError_HEADER_GUARD_ 00002 #define DOMError_HEADER_GUARD_ 00003 00004 /* 00005 * Copyright 2002,2004 The Apache Software Foundation. 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); 00008 * you may not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 */ 00019 00020 /* 00021 * $Id: DOMError.hpp 191054 2005-06-17 02:56:35Z jberry $ 00022 */ 00023 00024 00025 #include <xercesc/util/XercesDefs.hpp> 00026 00027 XERCES_CPP_NAMESPACE_BEGIN 00028 00029 class DOMLocator; 00030 00031 00039 class CDOM_EXPORT DOMError 00040 { 00041 protected: 00042 // ----------------------------------------------------------------------- 00043 // Hidden constructors 00044 // ----------------------------------------------------------------------- 00047 DOMError() {}; 00049 00050 private: 00051 // ----------------------------------------------------------------------- 00052 // Unimplemented constructors and operators 00053 // ----------------------------------------------------------------------- 00056 DOMError(const DOMError &); 00057 DOMError & operator = (const DOMError &); 00059 00060 public: 00061 // ----------------------------------------------------------------------- 00062 // All constructors are hidden, just the destructor is available 00063 // ----------------------------------------------------------------------- 00070 virtual ~DOMError() {}; 00072 00073 // ----------------------------------------------------------------------- 00074 // Class types 00075 // ----------------------------------------------------------------------- 00083 enum ErrorSeverity 00084 { 00085 DOM_SEVERITY_WARNING = 0, 00086 DOM_SEVERITY_ERROR = 1, 00087 DOM_SEVERITY_FATAL_ERROR = 2 00088 }; 00090 00091 00092 // ----------------------------------------------------------------------- 00093 // Virtual DOMError interface 00094 // ----------------------------------------------------------------------- 00097 // ----------------------------------------------------------------------- 00098 // Getter methods 00099 // ----------------------------------------------------------------------- 00108 virtual short getSeverity() const = 0; 00109 00118 virtual const XMLCh* getMessage() const = 0; 00119 00128 virtual DOMLocator* getLocation() const = 0; 00129 00138 virtual void* getRelatedException() const = 0; 00139 00157 virtual const XMLCh* getType() const = 0; 00158 00167 virtual void* getRelatedData() const = 0; 00168 00169 00170 // ----------------------------------------------------------------------- 00171 // Setter methods 00172 // ----------------------------------------------------------------------- 00182 virtual void setSeverity(const short severity) = 0; 00183 00193 virtual void setMessage(const XMLCh* const message) = 0; 00194 00204 virtual void setLocation(DOMLocator* const location) = 0; 00205 00215 virtual void setRelatedException(void* exc) const = 0; 00216 00234 virtual void setType(const XMLCh* type) = 0; 00235 00244 virtual void setRelatedData(void* relatedData) = 0; 00245 00247 00248 }; 00249 00250 XERCES_CPP_NAMESPACE_END 00251 00252 #endif