Xerces-C++: XMLDOMMsg.hpp Source File

- Main Page
- Related Pages
- Classes
- Files

# XMLDOMMsg.hpp

Go to the documentation of this file.

    00001 // This file is generated, don't edit it!!
    00002
    00003 #if !defined(XERCESC_INCLUDE_GUARD_ERRHEADER_XMLDOMMsg)
    00004 #define XERCESC_INCLUDE_GUARD_ERRHEADER_XMLDOMMsg
    00005
    00006 #include <xercesc/framework/XMLErrorReporter.hpp>
    00007 #include <xercesc/util/XercesDefs.hpp>
    00008 #include <xercesc/dom/DOMError.hpp>
    00009
    00010 XERCES_CPP_NAMESPACE_BEGIN
    00011
    00012 class XMLDOMMsg
    00013 {
    00014 public :
    00015     enum Codes
    00016     {
    00017         NoError                            = 0
    00018       , F_LowBounds                        = 1
    00019       , DOMEXCEPTION_ERRX                  = 2
    00020       , INDEX_SIZE_ERR                     = 3
    00021       , DOMSTRING_SIZE_ERR                 = 4
    00022       , HIERARCHY_REQUEST_ERR              = 5
    00023       , WRONG_DOCUMENT_ERR                 = 6
    00024       , INVALID_CHARACTER_ERR              = 7
    00025       , NO_DATA_ALLOWED_ERR                = 8
    00026       , NO_MODIFICATION_ALLOWED_ERR        = 9
    00027       , NOT_FOUND_ERR                      = 10
    00028       , NOT_SUPPORTED_ERR                  = 11
    00029       , INUSE_ATTRIBUTE_ERR                = 12
    00030       , INVALID_STATE_ERR                  = 13
    00031       , SYNTAX_ERR                         = 14
    00032       , INVALID_MODIFICATION_ERR           = 15
    00033       , NAMESPACE_ERR                      = 16
    00034       , INVALID_ACCESS_ERR                 = 17
    00035       , VALIDATION_ERR                     = 18
    00036       , TYPE_MISMATCH_ERR                  = 19
    00037       , DOMRANGEEXCEPTION_ERRX             = 20
    00038       , BAD_BOUNDARYPOINTS_ERR             = 21
    00039       , INVALID_NODE_TYPE_ERR              = 22
    00040       , DOMLSEXCEPTION_ERRX                = 23
    00041       , PARSE_ERR                          = 24
    00042       , SERIALIZE_ERR                      = 25
    00043       , DOMXPATHEXCEPTION_ERRX             = 26
    00044       , INVALID_EXPRESSION_ERR             = 27
    00045       , TYPE_ERR                           = 28
    00046       , NO_RESULT_ERR                      = 29
    00047       , Writer_NestedCDATA                 = 30
    00048       , Writer_NotRepresentChar            = 31
    00049       , Writer_NotRecognizedType           = 32
    00050       , LSParser_ParseInProgress           = 33
    00051       , LSParser_ParsingAborted            = 34
    00052       , LSParser_ParsingFailed             = 35
    00053       , F_HighBounds                       = 36
    00054       , W_LowBounds                        = 37
    00055       , W_HighBounds                       = 38
    00056       , E_LowBounds                        = 39
    00057       , E_HighBounds                       = 40
    00058     };
    00059
    00060     static bool isFatal(const XMLDOMMsg::Codes toCheck)
    00061     {
    00062         return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
    00063     }
    00064
    00065     static bool isWarning(const XMLDOMMsg::Codes toCheck)
    00066     {
    00067         return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
    00068     }
    00069
    00070     static bool isError(const XMLDOMMsg::Codes toCheck)
    00071     {
    00072         return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
    00073     }
    00074
    00075     static XMLErrorReporter::ErrTypes errorType(const XMLDOMMsg::Codes toCheck)
    00076     {
    00077        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
    00078            return XMLErrorReporter::ErrType_Warning;
    00079        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
    00080             return XMLErrorReporter::ErrType_Fatal;
    00081        else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
    00082             return XMLErrorReporter::ErrType_Error;
    00083        return XMLErrorReporter::ErrTypes_Unknown;
    00084     }
    00085     static DOMError::ErrorSeverity  DOMErrorType(const XMLDOMMsg::Codes toCheck)
    00086     {
    00087        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
    00088            return DOMError::DOM_SEVERITY_WARNING;
    00089        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
    00090             return DOMError::DOM_SEVERITY_FATAL_ERROR;
    00091        else return DOMError::DOM_SEVERITY_ERROR;
    00092     }
    00093
    00094 private:
    00095     // -----------------------------------------------------------------------
    00096     //  Unimplemented constructors and operators
    00097     // -----------------------------------------------------------------------
    00098     XMLDOMMsg();
    00099 };
    00100
    00101 XERCES_CPP_NAMESPACE_END
    00102
    00103 #endif
    00104