⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queue_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="l00064"></a><a class="code" href="class_byte_queue_1_1_walker.html">00064</a>         <span class="keyword">class </span><a class="code" href="class_byte_queue_1_1_walker.html">Walker</a> : <span class="keyword">public</span> <a class="code" href="class_input_rejecting.html" title="_">InputRejecting</a>&lt;BufferedTransformation&gt;<a name="l00065"></a>00065         {<a name="l00066"></a>00066         <span class="keyword">public</span>:<a name="l00067"></a><a class="code" href="class_byte_queue_1_1_walker.html#6690a4529e61498d2abc68f4fe07b01c">00067</a>                 <a class="code" href="class_byte_queue_1_1_walker.html">Walker</a>(<span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;queue)<a name="l00068"></a>00068                         : m_queue(queue) {Initialize();}<a name="l00069"></a>00069 <a name="l00070"></a><a class="code" href="class_byte_queue_1_1_walker.html#4ea60c7d732acbf91e4fb2b3bc3abaad">00070</a>                 lword GetCurrentPosition() {<span class="keywordflow">return</span> m_position;}<a name="l00071"></a>00071 <a name="l00072"></a><a class="code" href="class_byte_queue_1_1_walker.html#7e3e18155c288996a2243ced4c87c6b5">00072</a>                 lword MaxRetrievable()<span class="keyword"> const</span><a name="l00073"></a>00073 <span class="keyword">                        </span>{<span class="keywordflow">return</span> m_queue.CurrentSize() - m_position;}<a name="l00074"></a>00074 <a name="l00075"></a>00075                 <span class="keywordtype">void</span> IsolatedInitialize(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> &amp;parameters);<a name="l00076"></a>00076 <a name="l00077"></a>00077                 <span class="keywordtype">size_t</span> Get(byte &amp;outByte);<a name="l00078"></a>00078                 <span class="keywordtype">size_t</span> Get(byte *outString, <span class="keywordtype">size_t</span> getMax);<a name="l00079"></a>00079 <a name="l00080"></a>00080                 <span class="keywordtype">size_t</span> Peek(byte &amp;outByte) <span class="keyword">const</span>;<a name="l00081"></a>00081                 <span class="keywordtype">size_t</span> Peek(byte *outString, <span class="keywordtype">size_t</span> peekMax) <span class="keyword">const</span>;<a name="l00082"></a>00082 <a name="l00083"></a>00083                 <span class="keywordtype">size_t</span> TransferTo2(BufferedTransformation &amp;target, lword &amp;transferBytes, <span class="keyword">const</span> std::string &amp;channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>);<a name="l00084"></a>00084                 <span class="keywordtype">size_t</span> CopyRangeTo2(BufferedTransformation &amp;target, lword &amp;begin, lword end=LWORD_MAX, <span class="keyword">const</span> std::string &amp;channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>) <span class="keyword">const</span>;<a name="l00085"></a>00085 <a name="l00086"></a>00086         <span class="keyword">private</span>:<a name="l00087"></a>00087                 <span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;m_queue;<a name="l00088"></a>00088                 <span class="keyword">const</span> ByteQueueNode *m_node;<a name="l00089"></a>00089                 lword m_position;<a name="l00090"></a>00090                 <span class="keywordtype">size_t</span> m_offset;<a name="l00091"></a>00091                 <span class="keyword">const</span> byte *m_lazyString;<a name="l00092"></a>00092                 <span class="keywordtype">size_t</span> m_lazyLength;<a name="l00093"></a>00093         };<a name="l00094"></a>00094 <a name="l00095"></a><a class="code" href="class_byte_queue.html#561951adc2bae72717df4b975c66f02f">00095</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_byte_queue_1_1_walker.html">Walker</a>;<a name="l00096"></a>00096 <a name="l00097"></a>00097 <span class="keyword">private</span>:<a name="l00098"></a>00098         <span class="keywordtype">void</span> CleanupUsedNodes();<a name="l00099"></a>00099         <span class="keywordtype">void</span> CopyFrom(<span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;copy);<a name="l00100"></a>00100         <span class="keywordtype">void</span> Destroy();<a name="l00101"></a>00101 <a name="l00102"></a>00102         <span class="keywordtype">bool</span> m_autoNodeSize;<a name="l00103"></a>00103         <span class="keywordtype">size_t</span> m_nodeSize;<a name="l00104"></a>00104         ByteQueueNode *m_head, *m_tail;<a name="l00105"></a>00105         byte *m_lazyString;<a name="l00106"></a>00106         <span class="keywordtype">size_t</span> m_lazyLength;<a name="l00107"></a>00107         <span class="keywordtype">bool</span> m_lazyStringModifiable;<a name="l00108"></a>00108 };<a name="l00109"></a>00109 <span class="comment"></span><a name="l00110"></a>00110 <span class="comment">//! use this to make sure LazyPut is finalized in event of exception</span><a name="l00111"></a><a class="code" href="class_lazy_putter.html">00111</a> <span class="comment"></span><span class="keyword">class </span>CRYPTOPP_DLL <a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a><a name="l00112"></a>00112 {<a name="l00113"></a>00113 <span class="keyword">public</span>:<a name="l00114"></a><a class="code" href="class_lazy_putter.html#b58defac094b33fccec649873f8707eb">00114</a>         <a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a>(<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;bq, <span class="keyword">const</span> byte *inString, <span class="keywordtype">size_t</span> size)<a name="l00115"></a>00115                 : m_bq(bq) {bq.<a class="code" href="class_byte_queue.html#127af9acc2ad34922953abd30447afa1">LazyPut</a>(inString, size);}<a name="l00116"></a><a class="code" href="class_lazy_putter.html#6dbaca5f40745c1f71a792153c1203dc">00116</a>         ~<a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a>()<a name="l00117"></a>00117                 {<span class="keywordflow">try</span> {m_bq.FinalizeLazyPut();} <span class="keywordflow">catch</span>(...) {}}<a name="l00118"></a>00118 <span class="keyword">protected</span>:<a name="l00119"></a><a class="code" href="class_lazy_putter.html#12abfc66b854b744c9479c370b26c902">00119</a>         <a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a>(<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;bq) : m_bq(bq) {}<a name="l00120"></a>00120 <span class="keyword">private</span>:<a name="l00121"></a>00121         <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;m_bq;<a name="l00122"></a>00122 };<a name="l00123"></a>00123 <span class="comment"></span><a name="l00124"></a>00124 <span class="comment">//! like LazyPutter, but does a LazyPutModifiable instead</span><a name="l00125"></a><a class="code" href="class_lazy_putter_modifiable.html">00125</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_lazy_putter_modifiable.html" title="like LazyPutter, but does a LazyPutModifiable instead">LazyPutterModifiable</a> : <span class="keyword">public</span> <a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a><a name="l00126"></a>00126 {<a name="l00127"></a>00127 <span class="keyword">public</span>:<a name="l00128"></a><a class="code" href="class_lazy_putter_modifiable.html#46cbd28000808c11e13f4e326b2cbd89">00128</a>         <a class="code" href="class_lazy_putter_modifiable.html#46cbd28000808c11e13f4e326b2cbd89">LazyPutterModifiable</a>(<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;bq, byte *inString, <span class="keywordtype">size_t</span> size)<a name="l00129"></a>00129                 : <a class="code" href="class_lazy_putter.html" title="use this to make sure LazyPut is finalized in event of exception">LazyPutter</a>(bq) {bq.<a class="code" href="class_byte_queue.html#c90c40206fc9e8ae2c4fc984347a360a">LazyPutModifiable</a>(inString, size);}<a name="l00130"></a>00130 };<a name="l00131"></a>00131 <a name="l00132"></a>00132 NAMESPACE_END<a name="l00133"></a>00133 <a name="l00134"></a>00134 NAMESPACE_BEGIN(std)<a name="l00135"></a>00135 template&lt;&gt; inline <span class="keywordtype">void</span> <a class="code" href="gf2n_8h.html#cd9c045f0b5c2a7595a8a0872dc80f59">swap</a>(CryptoPP::<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;a, CryptoPP::<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &amp;b)<a name="l00136"></a>00136 {<a name="l00137"></a>00137         a.swap(b);<a name="l00138"></a>00138 }<a name="l00139"></a>00139 NAMESPACE_END<a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:23 2007 for Crypto++ by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -