Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Sources   Namespace Members   Compound Members   File Members  

MapperErrorHandler.h

00001 //$Header: /home/ben/Mapper/include/RCS/MapperErrorHandler.h,v 6.3 2002/07/09 22:50:56 ben Exp $
00002 #ifndef MAPPERERRORHANDLER_H
00003 #define MAPPERERRORHANDLER_H
00004 // Copyright Benedict Adamson 2002.
00005 // This file is part of Mapper.
00006 
00007 // Mapper is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011 
00012 // Mapper is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 
00017 // You should have received a copy of the GNU General Public License
00018 // along with Mapper; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 
00031 #include <string>
00032 #include <sax/ErrorHandler.hpp>
00033 
00034 #include "error.h"
00035 
00036 class DOM_DOMException;
00037 class DOM_Document;
00038 class DOM_Element;
00039 class SAXParseException;
00040 class XMLException;
00041 
00042 
00043 
00053 class MapperErrorHandler
00054    :public ErrorHandler
00055 {
00056    public: //constructors and destructor
00057 
00067       MapperErrorHandler(
00068          const char *name
00069          );
00070 
00071       virtual ~MapperErrorHandler(void);
00072 
00073    public: //attributes
00074 
00078       unsigned errors;
00079 
00084       const char *my_name;
00085 
00086    public: //messages
00087 
00094       virtual void fatalError(
00095          const SAXParseException &exception
00096          );
00097       
00104       virtual void error(
00105          const SAXParseException &exception
00106          );
00107       
00114       virtual void warning(
00115          const SAXParseException &exception
00116          );
00117       
00126       virtual void resetErrors(void);
00127 
00144       void error(
00145          const error::element_error &e
00146          );
00147 
00154       void fatalError(
00155          const DOM_DOMException &exception
00156          );
00157       
00164       void fatalError(
00165          const XMLException &exception
00166          );
00167 
00174       void unexpectedError(void);
00175      
00184       void badOptionArgument(
00185          const char option,
00186          const char *optarg
00187          );
00188 
00189 
00197       void error(
00198          const char *description
00199          );
00200 
00206       void warning(
00207          const char *description
00208          );
00209 
00225       void report(
00226          const string entity,
00227          const unsigned line,
00228          const unsigned column,
00229          const string &severity,
00230          const string &message
00231          ) const;
00232 
00243       void report(
00244          const SAXParseException &ex,
00245          const string &severity
00246          ) const;
00247 
00255       void report(
00256          const DOM_DOMException &ex,
00257          const string &severity
00258          ) const;
00259 
00260 };
00261 
00262 #endif

Generated at Sun Jul 14 20:38:10 2002 for Mapper by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999