📄 queue_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: queue.h 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.2 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</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> </ul></div><div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul></div><h1>queue.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// specification file for an unlimited queue for storing bytes</span><a name="l00002"></a>00002 <a name="l00003"></a>00003 <span class="preprocessor">#ifndef CRYPTOPP_QUEUE_H</span><a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_QUEUE_H</span><a name="l00005"></a>00005 <span class="preprocessor"></span><a name="l00006"></a>00006 <span class="preprocessor">#include "<a class="code" href="simple_8h.html">simple.h</a>"</span><a name="l00007"></a>00007 <span class="comment">//#include <algorithm></span><a name="l00008"></a>00008 <a name="l00009"></a>00009 NAMESPACE_BEGIN(CryptoPP)<a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="comment">/** The queue is implemented as a linked list of byte arrays, but you don't need to</span><a name="l00012"></a>00012 <span class="comment"> know about that. So just ignore this next line. :) */</span><a name="l00013"></a>00013 class <a class="code" href="class_byte_queue_node.html">ByteQueueNode</a>;<a name="l00014"></a>00014 <span class="comment"></span><a name="l00015"></a>00015 <span class="comment">//! Byte Queue</span><a name="l00016"></a><a class="code" href="class_byte_queue.html">00016</a> <span class="comment"></span>class CRYPTOPP_DLL <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> : public <a class="code" href="class_bufferless.html" title="_">Bufferless</a><<a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a>><a name="l00017"></a>00017 {<a name="l00018"></a>00018 <span class="keyword">public</span>:<a name="l00019"></a>00019 <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a>(<span class="keywordtype">size_t</span> nodeSize=0);<a name="l00020"></a>00020 <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a>(<span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &copy);<a name="l00021"></a>00021 ~<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a>();<a name="l00022"></a>00022 <a name="l00023"></a><a class="code" href="class_byte_queue.html#ad7436088ce8a852e9e95d291590a9f9">00023</a> lword MaxRetrievable()<span class="keyword"> const</span><a name="l00024"></a>00024 <span class="keyword"> </span>{<span class="keywordflow">return</span> CurrentSize();}<a name="l00025"></a><a class="code" href="class_byte_queue.html#e0d701bf528a1131917b77c0bb3fb369">00025</a> <span class="keywordtype">bool</span> AnyRetrievable()<span class="keyword"> const</span><a name="l00026"></a>00026 <span class="keyword"> </span>{<span class="keywordflow">return</span> !IsEmpty();}<a name="l00027"></a>00027 <a name="l00028"></a>00028 <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> &parameters);<a name="l00029"></a>00029 byte * CreatePutSpace(<span class="keywordtype">size_t</span> &size);<a name="l00030"></a>00030 <span class="keywordtype">size_t</span> Put2(<span class="keyword">const</span> byte *inString, <span class="keywordtype">size_t</span> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);<a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="keywordtype">size_t</span> Get(byte &outByte);<a name="l00033"></a>00033 <span class="keywordtype">size_t</span> Get(byte *outString, <span class="keywordtype">size_t</span> getMax);<a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="keywordtype">size_t</span> Peek(byte &outByte) <span class="keyword">const</span>;<a name="l00036"></a>00036 <span class="keywordtype">size_t</span> Peek(byte *outString, <span class="keywordtype">size_t</span> peekMax) <span class="keyword">const</span>;<a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keywordtype">size_t</span> TransferTo2(BufferedTransformation &target, lword &transferBytes, <span class="keyword">const</span> std::string &channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>);<a name="l00039"></a>00039 <span class="keywordtype">size_t</span> CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, <span class="keyword">const</span> std::string &channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>) <span class="keyword">const</span>;<a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="comment">// these member functions are not inherited</span><a name="l00042"></a>00042 <span class="keywordtype">void</span> SetNodeSize(<span class="keywordtype">size_t</span> nodeSize);<a name="l00043"></a>00043 <a name="l00044"></a>00044 lword CurrentSize() <span class="keyword">const</span>;<a name="l00045"></a>00045 <span class="keywordtype">bool</span> IsEmpty() <span class="keyword">const</span>;<a name="l00046"></a>00046 <a name="l00047"></a>00047 <span class="keywordtype">void</span> Clear();<a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="keywordtype">void</span> Unget(byte inByte);<a name="l00050"></a>00050 <span class="keywordtype">void</span> Unget(<span class="keyword">const</span> byte *inString, <span class="keywordtype">size_t</span> length);<a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="keyword">const</span> byte * Spy(<span class="keywordtype">size_t</span> &contiguousSize) <span class="keyword">const</span>;<a name="l00053"></a>00053 <a name="l00054"></a>00054 <span class="keywordtype">void</span> LazyPut(<span class="keyword">const</span> byte *inString, <span class="keywordtype">size_t</span> size);<a name="l00055"></a>00055 <span class="keywordtype">void</span> LazyPutModifiable(byte *inString, <span class="keywordtype">size_t</span> size);<a name="l00056"></a>00056 <span class="keywordtype">void</span> UndoLazyPut(<span class="keywordtype">size_t</span> size);<a name="l00057"></a>00057 <span class="keywordtype">void</span> FinalizeLazyPut();<a name="l00058"></a>00058 <a name="l00059"></a>00059 <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> & operator=(<span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &rhs);<a name="l00060"></a>00060 <span class="keywordtype">bool</span> <a class="code" href="gf2n_8h.html#22c25c181c409600aa2e4bf1067ac47a">operator==</a>(<span class="keyword">const</span> <a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &rhs) <span class="keyword">const</span>;<a name="l00061"></a>00061 byte operator[](lword i) <span class="keyword">const</span>;<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="gf2n_8h.html#cd9c045f0b5c2a7595a8a0872dc80f59">swap</a>(<a class="code" href="class_byte_queue.html" title="Byte Queue.">ByteQueue</a> &rhs);<a name="l00063"></a>00063
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -