You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ga...@apache.org on 2003/05/14 21:11:35 UTC

cvs commit: xml-xerces/c/tools/NLS/Xlat Xlat.cpp

gareth      2003/05/14 12:11:34

  Modified:    c/tools/NLS/Xlat Xlat.cpp
  Log:
  Added code creation for new method that returns error serverity the DOM way.
  
  Revision  Changes    Path
  1.18      +21 -1     xml-xerces/c/tools/NLS/Xlat/Xlat.cpp
  
  Index: Xlat.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tools/NLS/Xlat/Xlat.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Xlat.cpp	14 Apr 2003 08:41:00 -0000	1.17
  +++ Xlat.cpp	14 May 2003 19:11:34 -0000	1.18
  @@ -57,6 +57,9 @@
   
   /*
    * $Log$
  + * Revision 1.18  2003/05/14 19:11:34  gareth
  + * Added code creation for new method that returns error serverity the DOM way.
  + *
    * Revision 1.17  2003/04/14 08:41:00  gareth
    * Xlat now works under linux - Big thanks to Neil Graham (I no longer have to find a windows box). Still slight problems working with glibc before 2.2.4 (If you mess up the parameters it seg faults due to handling of wprintf)
    *
  @@ -712,7 +715,8 @@
                       fwprintf(outHeader, L"#include <xercesc/framework/XMLErrorReporter.hpp>\n");
   
                   //  Write out the namespace declaration
  -                fwprintf(outHeader, L"#include <xercesc/util/XercesDefs.hpp>\n\n");
  +                fwprintf(outHeader, L"#include <xercesc/util/XercesDefs.hpp>\n");
  +                fwprintf(outHeader, L"#include <xercesc/dom/DOMError.hpp>\n\n");
                   fwprintf(outHeader, L"XERCES_CPP_NAMESPACE_BEGIN\n\n");
   
                   //  Now the message codes
  @@ -896,6 +900,22 @@
                           , xmlStrToPrintable(errNameSpace)
                       );
                       releasePrintableStr
  +
  +                    fwprintf
  +                    (
  +                        outHeader
  +                        , L"    static DOMError::ErrorSeverity  DOMErrorType(const %s::Codes toCheck)\n"
  +                          L"    {\n"
  +                          L"       if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))\n"
  +                          L"           return DOMError::DOM_SEVERITY_WARNING;\n"
  +                          L"       else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))\n"
  +                          L"            return DOMError::DOM_SEVERITY_FATAL_ERROR;\n"
  +                          L"       else return DOMError::DOM_SEVERITY_ERROR;\n"
  +                          L"    }\n"
  +                        , xmlStrToPrintable(errNameSpace)
  +                    );
  +                    releasePrintableStr
  +
                   }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org