|
OpenADFortTk (basic)
|
00001 #ifndef XAIF_SAXErrorHandler_INCLUDED_h 00002 #define XAIF_SAXErrorHandler_INCLUDED_h 00003 00004 #include <iostream> 00005 00006 #include "xercesc/util/XercesDefs.hpp" 00007 #include "xercesc/sax/ErrorHandler.hpp" 00008 00009 #include "XercesStrX.h" 00010 00011 namespace xaif2whirl { 00012 00013 class XAIF_SAXErrorHandler : public xercesc::ErrorHandler { 00014 public: 00015 XAIF_SAXErrorHandler() 00016 : errors(false) { } 00017 00018 ~XAIF_SAXErrorHandler() { } 00019 00020 // ----------------------------------------------------------------------- 00021 // Implementation of the error handler interface 00022 // ----------------------------------------------------------------------- 00023 void warning(const xercesc::SAXParseException& toCatch); 00024 void error(const xercesc::SAXParseException& toCatch); 00025 void fatalError(const xercesc::SAXParseException& toCatch); 00026 void resetErrors(); 00027 00028 // ----------------------------------------------------------------------- 00029 // Getter methods 00030 // ----------------------------------------------------------------------- 00031 bool getErrors() const { return errors; } 00032 00033 private: 00034 00035 bool errors; // Set if we find any errors 00036 00037 }; 00038 00039 } // end namespace xaif2whirl 00040 00041 #endif 00042