peiyongz 2004/08/11 09:50:08 Modified: c/src/xercesc/util XMLUni.hpp XMLUni.cpp Log: Literal constants for Datatypes Revision Changes Path 1.36 +22 -1 xml-xerces/c/src/xercesc/util/XMLUni.hpp Index: XMLUni.hpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLUni.hpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- XMLUni.hpp 13 Apr 2004 16:54:35 -0000 1.35 +++ XMLUni.hpp 11 Aug 2004 16:50:08 -0000 1.36 @@ -300,6 +300,27 @@ // Default Exception String static const XMLCh fgDefErrMsg[]; + // Datatype + static const XMLCh fgValueZero[]; + static const XMLCh fgNegOne[]; + static const XMLCh fgValueOne[]; + static const XMLCh fgLongMaxInc[]; + static const XMLCh fgLongMinInc[]; + static const XMLCh fgIntMaxInc[]; + static const XMLCh fgIntMinInc[]; + static const XMLCh fgShortMaxInc[]; + static const XMLCh fgShortMinInc[]; + static const XMLCh fgByteMaxInc[]; + static const XMLCh fgByteMinInc[]; + static const XMLCh fgULongMaxInc[]; + static const XMLCh fgUIntMaxInc[]; + static const XMLCh fgUShortMaxInc[]; + static const XMLCh fgUByteMaxInc[]; + static const XMLCh fgLangPattern[]; + + static const XMLCh fgBooleanValueSpace[][32]; + static const unsigned int fgBooleanValueSpaceArraySize; + private: // ----------------------------------------------------------------------- // Unimplemented constructors and operators 1.41 +110 -1 xml-xerces/c/src/xercesc/util/XMLUni.cpp Index: XMLUni.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLUni.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- XMLUni.cpp 13 Apr 2004 16:54:35 -0000 1.40 +++ XMLUni.cpp 11 Aug 2004 16:50:08 -0000 1.41 @@ -1450,5 +1450,114 @@ , chLatin_g, chLatin_e, chNull }; +// Datatype +const XMLCh XMLUni::fgValueZero[] = +{ + chDigit_0, chNull +}; + +const XMLCh XMLUni::fgNegOne[] = +{ + chDash, chDigit_1, chNull +}; + +const XMLCh XMLUni::fgValueOne[] = +{ + chDigit_1, chNull +}; + +//"9223372036854775807" +const XMLCh XMLUni::fgLongMaxInc[] = +{ + chDigit_9, chDigit_2, chDigit_2, chDigit_3, chDigit_3, chDigit_7, chDigit_2, + chDigit_0, chDigit_3, chDigit_6, chDigit_8, chDigit_5, chDigit_4, chDigit_7, + chDigit_7, chDigit_5, chDigit_8, chDigit_0, chDigit_7, chNull +}; + +//"-9223372036854775808" +const XMLCh XMLUni::fgLongMinInc[] = +{ + chDash, chDigit_9, chDigit_2, chDigit_2, chDigit_3, chDigit_3, chDigit_7, + chDigit_2, chDigit_0, chDigit_3, chDigit_6, chDigit_8, chDigit_5, chDigit_4, + chDigit_7, chDigit_7, chDigit_5, chDigit_8, chDigit_0, chDigit_8, chNull +}; + +const XMLCh XMLUni::fgIntMaxInc[] = +{ + chDigit_2, chDigit_1, chDigit_4, chDigit_7, chDigit_4, chDigit_8, + chDigit_3, chDigit_6, chDigit_4, chDigit_7, chNull +}; + +const XMLCh XMLUni::fgIntMinInc[] = +{ + chDash, chDigit_2, chDigit_1, chDigit_4, chDigit_7, chDigit_4, + chDigit_8, chDigit_3, chDigit_6, chDigit_4, chDigit_8, chNull +}; + +const XMLCh XMLUni::fgShortMaxInc[] = +{ + chDigit_3, chDigit_2, chDigit_7, chDigit_6, chDigit_7, chNull +}; + +const XMLCh XMLUni::fgShortMinInc[] = +{ + chDash, chDigit_3, chDigit_2, chDigit_7, chDigit_6, chDigit_8, chNull +}; + +const XMLCh XMLUni::fgByteMaxInc[] = +{ + chDigit_1, chDigit_2, chDigit_7, chNull +}; + +const XMLCh XMLUni::fgByteMinInc[] = +{ + chDash, chDigit_1, chDigit_2, chDigit_8, chNull +}; + +const XMLCh XMLUni::fgULongMaxInc[] = +{ + chDigit_1, chDigit_8, chDigit_4, chDigit_4, chDigit_6, chDigit_7, chDigit_4, + chDigit_4, chDigit_0, chDigit_7, chDigit_3, chDigit_7, chDigit_0, chDigit_9, + chDigit_5, chDigit_5, chDigit_1, chDigit_6, chDigit_1, chDigit_5, chNull +}; + +const XMLCh XMLUni::fgUIntMaxInc[] = +{ + chDigit_4, chDigit_2, chDigit_9, chDigit_4, chDigit_9, chDigit_6, + chDigit_7, chDigit_2, chDigit_9, chDigit_5, chNull +}; + +const XMLCh XMLUni::fgUShortMaxInc[] = +{ + chDigit_6, chDigit_5, chDigit_5, chDigit_3, chDigit_5, chNull +}; + +const XMLCh XMLUni::fgUByteMaxInc[] = +{ + chDigit_2, chDigit_5, chDigit_5, chNull +}; + +// http://www.w3.org/2001/05/xmlschema-errata#Errata2 +// E2-25 +//"([a-zA-Z]{1,8})(-[a-zA-Z0-9]{1,8})*" +const XMLCh XMLUni::fgLangPattern[] = +{ + chOpenParen, chOpenSquare, chLatin_a, chDash, chLatin_z, chLatin_A, chDash, chLatin_Z, + chCloseSquare, chOpenCurly, chDigit_1, chComma, chDigit_8, chCloseCurly, chCloseParen, + chOpenParen, chDash, chOpenSquare, chLatin_a, chDash, chLatin_z, chLatin_A, chDash, chLatin_Z, + chDigit_0, chDash, chDigit_9, chCloseSquare, chOpenCurly, chDigit_1, chComma, chDigit_8, + chCloseCurly, chCloseParen, chAsterisk, chNull +}; + +const XMLCh XMLUni::fgBooleanValueSpace[][32] = +{ + { chLatin_f, chLatin_a, chLatin_l, chLatin_s, chLatin_e, chNull }, + { chLatin_t, chLatin_r, chLatin_u, chLatin_e, chNull }, + { chDigit_0, chNull }, + { chDigit_1, chNull } +}; + +const unsigned int XMLUni::fgBooleanValueSpaceArraySize = sizeof XMLUni::fgBooleanValueSpace / sizeof (XMLCh*); + XERCES_CPP_NAMESPACE_END
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]