00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef HEXBIN_HPP
00022 #define HEXBIN_HPP
00023
00024 #include <xercesc/util/PlatformUtils.hpp>
00025
00026 XERCES_CPP_NAMESPACE_BEGIN
00027
00028 class HexBin
00029 {
00030 public :
00032
00042 static int getDataLength(const XMLCh* const hexData);
00043
00053 static bool isArrayByteHex(const XMLCh* const hexData);
00054
00069 static XMLCh* getCanonicalRepresentation
00070 (
00071 const XMLCh* const hexData
00072 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00073 );
00074
00093 static XMLCh* decode(
00094 const XMLCh* const hexData
00095 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00096 );
00097
00114 static XMLByte* decodeToXMLByte(
00115 const XMLCh* const hexData
00116 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00117 );
00118
00119
00121
00122 private :
00123
00124
00125
00126
00127
00128 static void init();
00129
00130 static bool isHex(const XMLCh& octect);
00131
00132
00133
00134
00135 HexBin();
00136 HexBin(const HexBin&);
00137 HexBin& operator=(const HexBin&);
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151 static bool isInitialized;
00152 static XMLByte hexNumberTable[];
00153 };
00154
00155 XERCES_CPP_NAMESPACE_END
00156
00157 #endif