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