XMLDOMMsg.hpp
上传用户:zhuqijet
上传日期:2013-06-25
资源大小:10074k
文件大小:3k
源码类别:

词法分析

开发平台:

Visual C++

  1. // This file is generated, don't edit it!!
  2. #if !defined(ERRHEADER_XMLDOMMsg)
  3. #define ERRHEADER_XMLDOMMsg
  4. #include <xercesc/framework/XMLErrorReporter.hpp>
  5. #include <xercesc/util/XercesDefs.hpp>
  6. #include <xercesc/dom/DOMError.hpp>
  7. XERCES_CPP_NAMESPACE_BEGIN
  8. class XMLDOMMsg
  9. {
  10. public :
  11.     enum Codes
  12.     {
  13.         NoError                            = 0
  14.       , F_LowBounds                        = 1
  15.       , DOMEXCEPTION_ERRX                  = 2
  16.       , INDEX_SIZE_ERR                     = 3
  17.       , DOMSTRING_SIZE_ERR                 = 4
  18.       , HIERARCHY_REQUEST_ERR              = 5
  19.       , WRONG_DOCUMENT_ERR                 = 6
  20.       , INVALID_CHARACTER_ERR              = 7
  21.       , NO_DATA_ALLOWED_ERR                = 8
  22.       , NO_MODIFICATION_ALLOWED_ERR        = 9
  23.       , NOT_FOUND_ERR                      = 10
  24.       , NOT_SUPPORTED_ERR                  = 11
  25.       , INUSE_ATTRIBUTE_ERR                = 12
  26.       , INVALID_STATE_ERR                  = 13
  27.       , SYNTAX_ERR                         = 14
  28.       , INVALID_MODIFICATION_ERR           = 15
  29.       , NAMESPACE_ERR                      = 16
  30.       , INVALID_ACCESS_ERR                 = 17
  31.       , VALIDATION_ERR                     = 18
  32.       , DOMRANGEEXCEPTION_ERRX             = 19
  33.       , BAD_BOUNDARYPOINTS_ERR             = 20
  34.       , INVALID_NODE_TYPE_ERR              = 21
  35.       , Writer_NestedCDATA                 = 22
  36.       , Writer_NotRepresentChar            = 23
  37.       , Writer_NotRecognizedType           = 24
  38.       , F_HighBounds                       = 25
  39.       , W_LowBounds                        = 26
  40.       , W_HighBounds                       = 27
  41.       , E_LowBounds                        = 28
  42.       , E_HighBounds                       = 29
  43.     };
  44.     static bool isFatal(const XMLDOMMsg::Codes toCheck)
  45.     {
  46.         return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
  47.     }
  48.     static bool isWarning(const XMLDOMMsg::Codes toCheck)
  49.     {
  50.         return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
  51.     }
  52.     static bool isError(const XMLDOMMsg::Codes toCheck)
  53.     {
  54.         return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
  55.     }
  56.     static XMLErrorReporter::ErrTypes errorType(const XMLDOMMsg::Codes toCheck)
  57.     {
  58.        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
  59.            return XMLErrorReporter::ErrType_Warning;
  60.        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
  61.             return XMLErrorReporter::ErrType_Fatal;
  62.        else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
  63.             return XMLErrorReporter::ErrType_Error;
  64.        return XMLErrorReporter::ErrTypes_Unknown;
  65.     }
  66.     static DOMError::ErrorSeverity  DOMErrorType(const XMLDOMMsg::Codes toCheck)
  67.     {
  68.        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
  69.            return DOMError::DOM_SEVERITY_WARNING;
  70.        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
  71.             return DOMError::DOM_SEVERITY_FATAL_ERROR;
  72.        else return DOMError::DOM_SEVERITY_ERROR;
  73.     }
  74. };
  75. XERCES_CPP_NAMESPACE_END
  76. #endif