| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# HexBin.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 2001,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: HexBin.hpp,v 1.6 2004/09/08 13:56:22 peiyongz Exp $
    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
    00091     static XMLCh* decode(
    00092                          const XMLCh*          const    hexData
    00093                        ,       MemoryManager*  const    manager = XMLPlatformUtils::fgMemoryManager
    00094                         );
    00095
    00096
    00098
    00099 private :
    00100
    00101     // -----------------------------------------------------------------------
    00102     //  Helper methods
    00103     // -----------------------------------------------------------------------
    00104
    00105     static void init();
    00106
    00107     static bool isHex(const XMLCh& octect);
    00108
    00109     // -----------------------------------------------------------------------
    00110     //  Unimplemented constructors and operators
    00111     // -----------------------------------------------------------------------
    00112     HexBin();
    00113     HexBin(const HexBin&);
    00114     HexBin& operator=(const HexBin&);
    00115
    00116     // -----------------------------------------------------------------------
    00117     //  Private data members
    00118     //
    00119     //  isInitialized
    00120     //
    00121     //     set once hexNumberTable is initalized.
    00122     //
    00123     //  hexNumberTable
    00124     //
    00125     //     arrany holding valid hexNumber character.
    00126     //
    00127     // -----------------------------------------------------------------------
    00128     static bool       isInitialized;
    00129     static bool       hexNumberTable[];
    00130 };
    00131
    00132 XERCES_CPP_NAMESPACE_END
    00133
    00134 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.