|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>Xerces-C++: Base64.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Xerces-C++  <span id="projectnumber">3.1.2</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_901b4356d5f32ee418b4c714d07fb65a.html">src</a></li><li class="navelem"><a class="el" href="dir_477226ead712f319998d821c029f7620.html">xercesc</a></li><li class="navelem"><a class="el" href="dir_f02e54c5bd281853e16b6572a737d9ee.html">util</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">Base64.hpp</div> </div> </div><!--header--> <div class="contents"> <a href="Base64_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * contributor license agreements. See the NOTICE file distributed with</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * this work for additional information regarding copyright ownership.</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * (the "License"); you may not use this file except in compliance with</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * the License. You may obtain a copy of the License at</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * limitations under the License.</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> */</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">/*</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * $Id: Base64.hpp 932887 2010-04-11 13:04:59Z borisk $</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> */</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#if !defined(XERCESC_INCLUDE_GUARD_BASE64_HPP)</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#define XERCESC_INCLUDE_GUARD_BASE64_HPP</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include <<a class="code" href="XercesDefs_8hpp.html">xercesc/util/XercesDefs.hpp</a>></span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="XMLUniDefs_8hpp.html">xercesc/util/XMLUniDefs.hpp</a>></span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="MemoryManager_8hpp.html">xercesc/framework/MemoryManager.hpp</a>></span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <a class="code" href="XercesDefs_8hpp.html#a43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">//</span></div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// This class provides encode/decode for RFC 2045 Base64 as</span></div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// defined by RFC 2045, N. Freed and N. Borenstein.</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// RFC 2045: Multipurpose Internet Mail Extensions (MIME)</span></div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// Part One: Format of Internet Message Bodies. Reference</span></div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt</span></div> <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// This class is used by XML Schema binary format validation</span></div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">//</span></div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">//</span></div> <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classBase64.html"> 40</a></span> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a> <a class="code" href="classBase64.html">Base64</a></div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div> <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">public</span> :</div> <div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div> <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classBase64.html#acf90522d55eb3bcf9b5e01d7d10b0ff0"> 44</a></span>  <span class="keyword">enum</span> <a class="code" href="classBase64.html#acf90522d55eb3bcf9b5e01d7d10b0ff0">Conformance</a></div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  {</div> <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classBase64.html#acf90522d55eb3bcf9b5e01d7d10b0ff0a9355835efa2eff3175639aa56b0ab555"> 46</a></span>  Conf_RFC2045</div> <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classBase64.html#acf90522d55eb3bcf9b5e01d7d10b0ff0a2b8afb47ba4d571ebe7e18d73e4693d0"> 47</a></span>  , Conf_Schema</div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  };</div> <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> <div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* encode(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  , <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a> inputLength</div> <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* outputLength</div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0);</div> <div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div> <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decode(</div> <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* decodedLength</div> <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0</div> <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  , Conformance conform = Conf_RFC2045</div> <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  );</div> <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decodeToXMLByte(</div> <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* decodedLength</div> <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0</div> <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  , Conformance conform = Conf_RFC2045</div> <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  );</div> <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">static</span> <span class="keywordtype">int</span> getDataLength(</div> <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0</div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  , Conformance conform = Conf_RFC2045</div> <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  );</div> <div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div> <div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div> <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keyword">static</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* getCanonicalRepresentation</div> <div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  (</div> <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keyword">const</span> <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0</div> <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  , Conformance conform = Conf_RFC2045</div> <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  );</div> <div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div> <div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">private</span> :</div> <div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div> <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// Helper methods</span></div> <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div> <div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* decode(</div> <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>* <span class="keyword">const</span> inputData</div> <div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  , <a class="code" href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a>* outputLength</div> <div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  , <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>*& canRepData</div> <div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memMgr = 0</div> <div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  , Conformance conform = Conf_RFC2045</div> <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  );</div> <div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div> <div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> isData(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet);</div> <div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> isPad(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet);</div> <div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div> <div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> set1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> set2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keyword">static</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> set3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div> <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> split1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> split2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> split3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>&);</div> <div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div> <div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="comment">// Unimplemented constructors and operators</span></div> <div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="classBase64.html">Base64</a>();</div> <div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <a class="code" href="classBase64.html">Base64</a>(<span class="keyword">const</span> <a class="code" href="classBase64.html">Base64</a>&);</div> <div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div> <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="comment">// Private data members</span></div> <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">//</span></div> <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="comment">// base64Alphabet</span></div> <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="comment">// The Base64 alphabet (see RFC 2045).</span></div> <div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="comment">//</span></div> <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="comment">// base64Padding</span></div> <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// Padding character (see RFC 2045).</span></div> <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">//</span></div> <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="comment">// base64Inverse</span></div> <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="comment">// Table used in decoding base64.</span></div> <div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">//</span></div> <div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="comment">// isInitialized</span></div> <div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// Set once base64Inverse is initialized.</span></div> <div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="comment">//</span></div> <div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="comment">// quadsPerLine</span></div> <div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">// Number of quadruplets per one line. The encoded output</span></div> <div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="comment">// stream must be represented in lines of no more</span></div> <div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="comment">// than 19 quadruplets each.</span></div> <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">//</span></div> <div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div> <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Alphabet[];</div> <div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Padding;</div> <div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div> <div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> base64Inverse[];</div> <div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div> <div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> quadsPerLine;</div> <div class="line"><a name="l00224"></a><span class="lineno"> 224</span> };</div> <div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div> <div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="comment">// Helper methods</span></div> <div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="comment">// -----------------------------------------------------------------------</span></div> <div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> Base64::isPad(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& octet)</div> <div class="line"><a name="l00230"></a><span class="lineno"> 230</span> {</div> <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">return</span> ( octet == base64Padding );</div> <div class="line"><a name="l00232"></a><span class="lineno"> 232</span> }</div> <div class="line"><a name="l00233"></a><span class="lineno"> 233</span> </div> <div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b1, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2)</div> <div class="line"><a name="l00235"></a><span class="lineno"> 235</span> {</div> <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> (( b1 << 2 ) | ( b2 >> 4 ));</div> <div class="line"><a name="l00237"></a><span class="lineno"> 237</span> }</div> <div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div> <div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3)</div> <div class="line"><a name="l00240"></a><span class="lineno"> 240</span> {</div> <div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">return</span> (( b2 << 4 ) | ( b3 >> 2 ));</div> <div class="line"><a name="l00242"></a><span class="lineno"> 242</span> }</div> <div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div> <div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="keyword">inline</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a> Base64::set3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3, <span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b4)</div> <div class="line"><a name="l00245"></a><span class="lineno"> 245</span> {</div> <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">return</span> (( b3 << 6 ) | b4 );</div> <div class="line"><a name="l00247"></a><span class="lineno"> 247</span> }</div> <div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div> <div class="line"><a name="l00249"></a><span class="lineno"> 249</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split1stOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b1, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2) {</div> <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  b1 = ch >> 2;</div> <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  b2 = ( ch & 0x3 ) << 4;</div> <div class="line"><a name="l00252"></a><span class="lineno"> 252</span> }</div> <div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div> <div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split2ndOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b2, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3) {</div> <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  b2 |= ch >> 4; <span class="comment">// combine with previous value</span></div> <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  b3 = ( ch & 0xf ) << 2;</div> <div class="line"><a name="l00257"></a><span class="lineno"> 257</span> }</div> <div class="line"><a name="l00258"></a><span class="lineno"> 258</span> </div> <div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Base64::split3rdOctet(<span class="keyword">const</span> <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& ch, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b3, <a class="code" href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a>& b4) {</div> <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  b3 |= ch >> 6; <span class="comment">// combine with previous value</span></div> <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  b4 = ( ch & 0x3f );</div> <div class="line"><a name="l00262"></a><span class="lineno"> 262</span> }</div> <div class="line"><a name="l00263"></a><span class="lineno"> 263</span> </div> <div class="line"><a name="l00264"></a><span class="lineno"> 264</span> <a class="code" href="XercesDefs_8hpp.html#af03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a></div> <div class="line"><a name="l00265"></a><span class="lineno"> 265</span> </div> <div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="preprocessor">#endif</span></div> <div class="ttc" id="MemoryManager_8hpp_html"><div class="ttname"><a href="MemoryManager_8hpp.html">MemoryManager.hpp</a></div></div> <div class="ttc" id="XercesDefs_8hpp_html"><div class="ttname"><a href="XercesDefs_8hpp.html">XercesDefs.hpp</a></div></div> <div class="ttc" id="classMemoryManager_html"><div class="ttname"><a href="classMemoryManager.html">MemoryManager</a></div><div class="ttdoc">Configurable memory manager. </div><div class="ttdef"><b>Definition:</b> MemoryManager.hpp:39</div></div> <div class="ttc" id="Xerces__autoconf__config_8borland_8hpp_html_ac0f7e36996cd03eb43bcee10321f77cd"><div class="ttname"><a href="Xerces__autoconf__config_8borland_8hpp.html#ac0f7e36996cd03eb43bcee10321f77cd">XMLSize_t</a></div><div class="ttdeci">SIZE_T XMLSize_t</div><div class="ttdef"><b>Definition:</b> Xerces_autoconf_config.borland.hpp:86</div></div> <div class="ttc" id="XMLUniDefs_8hpp_html"><div class="ttname"><a href="XMLUniDefs_8hpp.html">XMLUniDefs.hpp</a></div></div> <div class="ttc" id="XercesDefs_8hpp_html_a43d74fa53d868d978f3e97cbb78b194d"><div class="ttname"><a href="XercesDefs_8hpp.html#a43d74fa53d868d978f3e97cbb78b194d">XERCES_CPP_NAMESPACE_BEGIN</a></div><div class="ttdeci">#define XERCES_CPP_NAMESPACE_BEGIN</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:112</div></div> <div class="ttc" id="Xerces__autoconf__config_8borland_8hpp_html_a8cb107980a360c490ad7661f5d27cc0e"><div class="ttname"><a href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a></div><div class="ttdeci">wchar_t XMLCh</div><div class="ttdef"><b>Definition:</b> Xerces_autoconf_config.borland.hpp:92</div></div> <div class="ttc" id="XercesDefs_8hpp_html_a7470c7a32c59355685ebcd878a33f126"><div class="ttname"><a href="XercesDefs_8hpp.html#a7470c7a32c59355685ebcd878a33f126">XMLByte</a></div><div class="ttdeci">unsigned char XMLByte</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:65</div></div> <div class="ttc" id="XercesDefs_8hpp_html_a97a524372e218133a8eb0aca39b4bd21"><div class="ttname"><a href="XercesDefs_8hpp.html#a97a524372e218133a8eb0aca39b4bd21">XMLUTIL_EXPORT</a></div><div class="ttdeci">#define XMLUTIL_EXPORT</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:162</div></div> <div class="ttc" id="XercesDefs_8hpp_html_af03d5cb905763ef7a7bd22ab82718285"><div class="ttname"><a href="XercesDefs_8hpp.html#af03d5cb905763ef7a7bd22ab82718285">XERCES_CPP_NAMESPACE_END</a></div><div class="ttdeci">#define XERCES_CPP_NAMESPACE_END</div><div class="ttdef"><b>Definition:</b> XercesDefs.hpp:113</div></div> <div class="ttc" id="classBase64_html"><div class="ttname"><a href="classBase64.html">Base64</a></div><div class="ttdef"><b>Definition:</b> Base64.hpp:40</div></div> <div class="ttc" id="classBase64_html_acf90522d55eb3bcf9b5e01d7d10b0ff0"><div class="ttname"><a href="classBase64.html#acf90522d55eb3bcf9b5e01d7d10b0ff0">Base64::Conformance</a></div><div class="ttdeci">Conformance</div><div class="ttdef"><b>Definition:</b> Base64.hpp:44</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Wed Mar 18 2015 10:43:36 for Xerces-C++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
|