http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DOMError.hpp

Go to the documentation of this file.
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  * $Log: DOMError.hpp,v $
00022  * Revision 1.12  2004/09/08 13:55:39  peiyongz
00023  * Apache License Version 2.0
00024  *
00025  * Revision 1.11  2003/12/01 23:23:25  neilg
00026  * fix for bug 25118; thanks to Jeroen Witmond
00027  *
00028  * Revision 1.10  2003/05/30 16:11:43  gareth
00029  * Fixes so we compile under VC7.1. Patch by Alberto Massari.
00030  *
00031  * Revision 1.9  2003/05/14 18:06:53  gareth
00032  * Updated DOMError to http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html.
00033  *
00034  * Revision 1.8  2003/03/07 19:59:04  tng
00035  * [Bug 11692] Unimplement the hidden constructors and assignment operator to remove warnings from gcc.
00036  *
00037  * Revision 1.7  2002/11/04 15:09:24  tng
00038  * C++ Namespace Support.
00039  *
00040  * Revision 1.6  2002/08/22 15:04:57  tng
00041  * Remove unused parameter variables in inline functions.
00042  *
00043  * Revision 1.5  2002/07/15 19:25:25  tng
00044  * DOM L3:  declare a dummy DOMError::set/getRelatedException
00045  *
00046  * Revision 1.4  2002/06/06 21:01:21  tng
00047  * [Bug 9639] enum_mem in DOMError clashes with constant.
00048  *
00049  * Revision 1.3  2002/06/06 20:53:06  tng
00050  * Documentation Fix: Update the API Documentation for DOM headers
00051  *
00052  * Revision 1.2  2002/05/30 19:24:48  knoaman
00053  * documentation update
00054  *
00055  * Revision 1.1  2002/05/23 15:47:24  knoaman
00056  * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
00057  *
00058  */
00059 
00060 
00061 #include <xercesc/util/XercesDefs.hpp>
00062 
00063 XERCES_CPP_NAMESPACE_BEGIN
00064 
00065 class DOMLocator;
00066 
00067 
00075 class  DOMError
00076 {
00077 protected:
00078     // -----------------------------------------------------------------------
00079     //  Hidden constructors
00080     // -----------------------------------------------------------------------
00083     DOMError() {};
00085 
00086 private:
00087     // -----------------------------------------------------------------------
00088     // Unimplemented constructors and operators
00089     // -----------------------------------------------------------------------
00092     DOMError(const DOMError &);
00093     DOMError & operator = (const DOMError &);
00095 
00096 public:
00097     // -----------------------------------------------------------------------
00098     //  All constructors are hidden, just the destructor is available
00099     // -----------------------------------------------------------------------
00106     virtual ~DOMError() {};
00108 
00109     // -----------------------------------------------------------------------
00110     //  Class types
00111     // -----------------------------------------------------------------------
00119     enum ErrorSeverity
00120     {
00121         DOM_SEVERITY_WARNING     = 0,
00122         DOM_SEVERITY_ERROR       = 1,
00123         DOM_SEVERITY_FATAL_ERROR = 2
00124     };
00126 
00127 
00128     // -----------------------------------------------------------------------
00129     //  Virtual DOMError interface
00130     // -----------------------------------------------------------------------
00133     // -----------------------------------------------------------------------
00134     //  Getter methods
00135     // -----------------------------------------------------------------------
00144     virtual short getSeverity() const = 0;
00145 
00154     virtual const XMLCh* getMessage() const = 0;
00155 
00164     virtual DOMLocator* getLocation() const = 0;
00165 
00174     virtual void* getRelatedException() const = 0;
00175 
00193     virtual const XMLCh* getType() const = 0;
00194 
00203     virtual void* getRelatedData() const = 0;
00204 
00205 
00206     // -----------------------------------------------------------------------
00207     //  Setter methods
00208     // -----------------------------------------------------------------------
00218     virtual void setSeverity(const short severity) = 0;
00219 
00229     virtual void setMessage(const XMLCh* const message) = 0;
00230 
00240     virtual void setLocation(DOMLocator* const location) = 0;
00241 
00251     virtual void setRelatedException(void* exc) const = 0;
00252 
00270     virtual void setType(const XMLCh* type) = 0;
00271 
00280     virtual void setRelatedData(void* relatedData) = 0;
00281 
00283 
00284 };
00285 
00286 XERCES_CPP_NAMESPACE_END
00287 
00288 #endif


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.