Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/xerces-c-3.0.0@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
Executable
+204
@@ -0,0 +1,204 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<title>Xerces-C++: Base64.hpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.5.4 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>Base64.hpp</h1><a href="Base64_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||||
<a name="l00002"></a>00002 <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span>
|
||||
<a name="l00003"></a>00003 <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span>
|
||||
<a name="l00004"></a>00004 <span class="comment"> * this work for additional information regarding copyright ownership.</span>
|
||||
<a name="l00005"></a>00005 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span>
|
||||
<a name="l00006"></a>00006 <span class="comment"> * (the "License"); you may not use this file except in compliance with</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> * the License. You may obtain a copy of the License at</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"> * </span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> * </span>
|
||||
<a name="l00011"></a>00011 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
|
||||
<a name="l00012"></a>00012 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
|
||||
<a name="l00013"></a>00013 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
|
||||
<a name="l00014"></a>00014 <span class="comment"> * See the License for the specific language governing permissions and</span>
|
||||
<a name="l00015"></a>00015 <span class="comment"> * limitations under the License.</span>
|
||||
<a name="l00016"></a>00016 <span class="comment"> */</span>
|
||||
<a name="l00017"></a>00017
|
||||
<a name="l00018"></a>00018 <span class="comment">/*</span>
|
||||
<a name="l00019"></a>00019 <span class="comment"> * $Id: Base64.hpp 555320 2007-07-11 16:05:13Z amassari $</span>
|
||||
<a name="l00020"></a>00020 <span class="comment"> */</span>
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a>00022 <span class="preprocessor">#if !defined(XERCESC_INCLUDE_GUARD_BASE64_HPP)</span>
|
||||
<a name="l00023"></a><a class="code" href="Base64_8hpp.html#b88e29b094f8e4977742d8d748fd2661">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define XERCESC_INCLUDE_GUARD_BASE64_HPP</span>
|
||||
<a name="l00024"></a>00024 <span class="preprocessor"></span>
|
||||
<a name="l00025"></a>00025 <span class="preprocessor">#include <<a class="code" href="XercesDefs_8hpp.html">xercesc/util/XercesDefs.hpp</a>></span>
|
||||
<a name="l00026"></a>00026 <span class="preprocessor">#include <<a class="code" href="XMLUniDefs_8hpp.html">xercesc/util/XMLUniDefs.hpp</a>></span>
|
||||
<a name="l00027"></a>00027 <span class="preprocessor">#include <<a class="code" href="MemoryManager_8hpp.html">xercesc/framework/MemoryManager.hpp</a>></span>
|
||||
<a name="l00028"></a>00028
|
||||
<a name="l00029"></a>00029 <a class="code" href="XercesDefs_8hpp.html#43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a>
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a>00031 <span class="comment">//</span>
|
||||
<a name="l00032"></a>00032 <span class="comment">// This class provides encode/decode for RFC 2045 Base64 as</span>
|
||||
<a name="l00033"></a>00033 <span class="comment">// defined by RFC 2045, N. Freed and N. Borenstein.</span>
|
||||
<a name="l00034"></a>00034 <span class="comment">// RFC 2045: Multipurpose Internet Mail Extensions (MIME)</span>
|
||||
<a name="l00035"></a>00035 <span class="comment">// Part One: Format of Internet Message Bodies. Reference</span>
|
||||
<a name="l00036"></a>00036 <span class="comment">// 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt</span>
|
||||
<a name="l00037"></a>00037 <span class="comment">// This class is used by XML Schema binary format validation</span>
|
||||
<a name="l00038"></a>00038 <span class="comment">//</span>
|
||||
<a name="l00039"></a>00039 <span class="comment">//</span>
|
||||
<a name="l00040"></a><a class="code" href="classBase64.html">00040</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classBase64.html">Base64</a>
|
||||
<a name="l00041"></a>00041 {
|
||||
<a name="l00042"></a>00042 <span class="keyword">public</span> :
|
||||
<a name="l00043"></a>00043
|
||||
<a name="l00044"></a><a class="code" href="classBase64.html#cf90522d55eb3bcf9b5e01d7d10b0ff0">00044</a> <span class="keyword">enum</span> <a class="code" href="classBase64.html#cf90522d55eb3bcf9b5e01d7d10b0ff0">Conformance</a>
|
||||
<a name="l00045"></a>00045 {
|
||||
<a name="l00046"></a><a class="code" href="classBase64.html#cf90522d55eb3bcf9b5e01d7d10b0ff09355835efa2eff3175639aa56b0ab555">00046</a> Conf_RFC2045
|
||||
<a name="l00047"></a><a class="code" href="classBase64.html#cf90522d55eb3bcf9b5e01d7d10b0ff02b8afb47ba4d571ebe7e18d73e4693d0">00047</a> , Conf_Schema
|
||||
<a name="l00048"></a>00048 };
|
||||
<a name="l00049"></a>00049
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00070"></a>00070 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* encode(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00071"></a>00071 , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> inputLength
|
||||
<a name="l00072"></a>00072 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* outputLength
|
||||
<a name="l00073"></a>00073 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0);
|
||||
<a name="l00074"></a>00074
|
||||
<a name="l00097"></a>00097 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decode(
|
||||
<a name="l00098"></a>00098 <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00099"></a>00099 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* decodedLength
|
||||
<a name="l00100"></a>00100 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0
|
||||
<a name="l00101"></a>00101 , Conformance conform = Conf_RFC2045
|
||||
<a name="l00102"></a>00102 );
|
||||
<a name="l00103"></a>00103
|
||||
<a name="l00126"></a>00126 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decodeToXMLByte(
|
||||
<a name="l00127"></a>00127 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00128"></a>00128 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* decodedLength
|
||||
<a name="l00129"></a>00129 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0
|
||||
<a name="l00130"></a>00130 , Conformance conform = Conf_RFC2045
|
||||
<a name="l00131"></a>00131 );
|
||||
<a name="l00144"></a>00144 <span class="keyword">static</span> <span class="keywordtype">int</span> getDataLength(
|
||||
<a name="l00145"></a>00145 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00146"></a>00146 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0
|
||||
<a name="l00147"></a>00147 , Conformance conform = Conf_RFC2045
|
||||
<a name="l00148"></a>00148 );
|
||||
<a name="l00149"></a>00149
|
||||
<a name="l00151"></a>00151
|
||||
<a name="l00167"></a>00167 <span class="keyword">static</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* getCanonicalRepresentation
|
||||
<a name="l00168"></a>00168 (
|
||||
<a name="l00169"></a>00169 <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00170"></a>00170 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0
|
||||
<a name="l00171"></a>00171 , Conformance conform = Conf_RFC2045
|
||||
<a name="l00172"></a>00172 );
|
||||
<a name="l00173"></a>00173
|
||||
<a name="l00174"></a>00174 <span class="keyword">private</span> :
|
||||
<a name="l00175"></a>00175
|
||||
<a name="l00176"></a>00176 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00177"></a>00177 <span class="comment">// Helper methods</span>
|
||||
<a name="l00178"></a>00178 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00179"></a>00179
|
||||
<a name="l00180"></a>00180 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decode(
|
||||
<a name="l00181"></a>00181 <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData
|
||||
<a name="l00182"></a>00182 , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#c0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* outputLength
|
||||
<a name="l00183"></a>00183 , <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>*& canRepData
|
||||
<a name="l00184"></a>00184 , <a class="code" href="classMemoryManager.html" title="Configurable memory manager.">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0
|
||||
<a name="l00185"></a>00185 , Conformance conform = Conf_RFC2045
|
||||
<a name="l00186"></a>00186 );
|
||||
<a name="l00187"></a>00187
|
||||
<a name="l00188"></a>00188 <span class="keyword">static</span> <span class="keywordtype">bool</span> isData(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet);
|
||||
<a name="l00189"></a>00189 <span class="keyword">static</span> <span class="keywordtype">bool</span> isPad(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet);
|
||||
<a name="l00190"></a>00190
|
||||
<a name="l00191"></a>00191 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> set1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00192"></a>00192 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> set2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00193"></a>00193 <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> set3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00194"></a>00194
|
||||
<a name="l00195"></a>00195 <span class="keyword">static</span> <span class="keywordtype">void</span> split1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00196"></a>00196 <span class="keyword">static</span> <span class="keywordtype">void</span> split2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00197"></a>00197 <span class="keyword">static</span> <span class="keywordtype">void</span> split3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);
|
||||
<a name="l00198"></a>00198
|
||||
<a name="l00199"></a>00199 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00200"></a>00200 <span class="comment">// Unimplemented constructors and operators</span>
|
||||
<a name="l00201"></a>00201 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00202"></a>00202 <a class="code" href="classBase64.html">Base64</a>();
|
||||
<a name="l00203"></a>00203 <a class="code" href="classBase64.html">Base64</a>(<span class="keyword">const</span> <a class="code" href="classBase64.html">Base64</a>&);
|
||||
<a name="l00204"></a>00204
|
||||
<a name="l00205"></a>00205 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00206"></a>00206 <span class="comment">// Private data members</span>
|
||||
<a name="l00207"></a>00207 <span class="comment">//</span>
|
||||
<a name="l00208"></a>00208 <span class="comment">// base64Alphabet</span>
|
||||
<a name="l00209"></a>00209 <span class="comment">// The Base64 alphabet (see RFC 2045).</span>
|
||||
<a name="l00210"></a>00210 <span class="comment">//</span>
|
||||
<a name="l00211"></a>00211 <span class="comment">// base64Padding</span>
|
||||
<a name="l00212"></a>00212 <span class="comment">// Padding character (see RFC 2045).</span>
|
||||
<a name="l00213"></a>00213 <span class="comment">//</span>
|
||||
<a name="l00214"></a>00214 <span class="comment">// base64Inverse</span>
|
||||
<a name="l00215"></a>00215 <span class="comment">// Table used in decoding base64.</span>
|
||||
<a name="l00216"></a>00216 <span class="comment">//</span>
|
||||
<a name="l00217"></a>00217 <span class="comment">// isInitialized</span>
|
||||
<a name="l00218"></a>00218 <span class="comment">// Set once base64Inverse is initalized.</span>
|
||||
<a name="l00219"></a>00219 <span class="comment">//</span>
|
||||
<a name="l00220"></a>00220 <span class="comment">// quadsPerLine</span>
|
||||
<a name="l00221"></a>00221 <span class="comment">// Number of quadruplets per one line. The encoded output</span>
|
||||
<a name="l00222"></a>00222 <span class="comment">// stream must be represented in lines of no more</span>
|
||||
<a name="l00223"></a>00223 <span class="comment">// than 19 quadruplets each.</span>
|
||||
<a name="l00224"></a>00224 <span class="comment">//</span>
|
||||
<a name="l00225"></a>00225 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00226"></a>00226
|
||||
<a name="l00227"></a>00227 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Alphabet[];
|
||||
<a name="l00228"></a>00228 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Padding;
|
||||
<a name="l00229"></a>00229
|
||||
<a name="l00230"></a>00230 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Inverse[];
|
||||
<a name="l00231"></a>00231
|
||||
<a name="l00232"></a>00232 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> quadsPerLine;
|
||||
<a name="l00233"></a>00233 };
|
||||
<a name="l00234"></a>00234
|
||||
<a name="l00235"></a>00235 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00236"></a>00236 <span class="comment">// Helper methods</span>
|
||||
<a name="l00237"></a>00237 <span class="comment">// -----------------------------------------------------------------------</span>
|
||||
<a name="l00238"></a>00238 <span class="keyword">inline</span> <span class="keywordtype">bool</span> Base64::isPad(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet)
|
||||
<a name="l00239"></a>00239 {
|
||||
<a name="l00240"></a>00240 <span class="keywordflow">return</span> ( octet == base64Padding );
|
||||
<a name="l00241"></a>00241 }
|
||||
<a name="l00242"></a>00242
|
||||
<a name="l00243"></a>00243 <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b1, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2)
|
||||
<a name="l00244"></a>00244 {
|
||||
<a name="l00245"></a>00245 <span class="keywordflow">return</span> (( b1 << 2 ) | ( b2 >> 4 ));
|
||||
<a name="l00246"></a>00246 }
|
||||
<a name="l00247"></a>00247
|
||||
<a name="l00248"></a>00248 <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3)
|
||||
<a name="l00249"></a>00249 {
|
||||
<a name="l00250"></a>00250 <span class="keywordflow">return</span> (( b2 << 4 ) | ( b3 >> 2 ));
|
||||
<a name="l00251"></a>00251 }
|
||||
<a name="l00252"></a>00252
|
||||
<a name="l00253"></a>00253 <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b4)
|
||||
<a name="l00254"></a>00254 {
|
||||
<a name="l00255"></a>00255 <span class="keywordflow">return</span> (( b3 << 6 ) | b4 );
|
||||
<a name="l00256"></a>00256 }
|
||||
<a name="l00257"></a>00257
|
||||
<a name="l00258"></a>00258 <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b1, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2) {
|
||||
<a name="l00259"></a>00259 b1 = ch >> 2;
|
||||
<a name="l00260"></a>00260 b2 = ( ch & 0x3 ) << 4;
|
||||
<a name="l00261"></a>00261 }
|
||||
<a name="l00262"></a>00262
|
||||
<a name="l00263"></a>00263 <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3) {
|
||||
<a name="l00264"></a>00264 b2 |= ch >> 4; <span class="comment">// combine with previous value</span>
|
||||
<a name="l00265"></a>00265 b3 = ( ch & 0xf ) << 2;
|
||||
<a name="l00266"></a>00266 }
|
||||
<a name="l00267"></a>00267
|
||||
<a name="l00268"></a>00268 <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3, <a class="code" href="XercesDefs_8hpp.html#7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b4) {
|
||||
<a name="l00269"></a>00269 b3 |= ch >> 6; <span class="comment">// combine with previous value</span>
|
||||
<a name="l00270"></a>00270 b4 = ( ch & 0x3f );
|
||||
<a name="l00271"></a>00271 }
|
||||
<a name="l00272"></a>00272
|
||||
<a name="l00273"></a>00273 <a class="code" href="XercesDefs_8hpp.html#f03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a>
|
||||
<a name="l00274"></a>00274
|
||||
<a name="l00275"></a>00275 <span class="preprocessor">#endif</span>
|
||||
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 24 16:36:33 2008 for Xerces-C++ by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user