|
OpenADFortTk (basic)
|
00001 // -*-Mode: C++;-*- 00002 // $Header: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/xaif2whirl/XAIF_DOMErrorHandler.h,v 1.2 2006-05-12 16:12:23 utke Exp $ 00003 00004 00005 #ifndef XAIF_DOMErrorHandler_INCLUDED_h 00006 #define XAIF_DOMErrorHandler_INCLUDED_h 00007 00008 00009 #include <iostream> 00010 00011 #include "xercesc/util/XercesDefs.hpp" 00012 #include "xercesc/sax/ErrorHandler.hpp" 00013 00014 #include "XercesStrX.h" 00015 00016 namespace xaif2whirl { 00017 00018 class XAIF_DOMErrorHandler : public xercesc::ErrorHandler 00019 { 00020 public: 00021 XAIF_DOMErrorHandler() 00022 : errors(false) { } 00023 00024 ~XAIF_DOMErrorHandler() { } 00025 00026 // ----------------------------------------------------------------------- 00027 // Implementation of the error handler interface 00028 // ----------------------------------------------------------------------- 00029 void warning(const xercesc::SAXParseException& toCatch); 00030 void error(const xercesc::SAXParseException& toCatch); 00031 void fatalError(const xercesc::SAXParseException& toCatch); 00032 void resetErrors(); 00033 00034 // ----------------------------------------------------------------------- 00035 // Getter methods 00036 // ----------------------------------------------------------------------- 00037 bool getErrors() const { return errors; } 00038 00039 private: 00040 00041 bool errors; // Set if we find any errors 00042 00043 }; 00044 00045 } 00046 00047 #endif