You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

258 lines
38 KiB

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