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

📄 channels_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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++: channels.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&nbsp;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&nbsp;List</span></a></li>    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>  </ul></div><h1>channels.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_CHANNELS_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_CHANNELS_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><a name="l00004"></a>00004 <span class="preprocessor">#include "<a class="code" href="simple_8h.html">simple.h</a>"</span><a name="l00005"></a>00005 <span class="preprocessor">#include "smartptr.h"</span><a name="l00006"></a>00006 <span class="preprocessor">#include &lt;map&gt;</span><a name="l00007"></a>00007 <span class="preprocessor">#include &lt;list&gt;</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="preprocessor">#if 0</span><span class="comment"></span><a name="l00012"></a>00012 <span class="comment">//! Route input on default channel to different and/or multiple channels based on message sequence number</span><a name="l00013"></a>00013 <span class="comment"></span>class MessageSwitch : public Sink<a name="l00014"></a>00014 {<a name="l00015"></a>00015 <span class="keyword">public</span>:<a name="l00016"></a>00016         <span class="keywordtype">void</span> AddDefaultRoute(<a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> &amp;destination, <span class="keyword">const</span> std::string &amp;channel);<a name="l00017"></a>00017         <span class="keywordtype">void</span> AddRoute(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> end, <a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> &amp;destination, <span class="keyword">const</span> std::string &amp;channel);<a name="l00018"></a>00018 <a name="l00019"></a>00019         <span class="keywordtype">void</span> Put(byte inByte);<a name="l00020"></a>00020         <span class="keywordtype">void</span> Put(<span class="keyword">const</span> byte *inString, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length);<a name="l00021"></a>00021 <a name="l00022"></a>00022         <span class="keywordtype">void</span> Flush(<span class="keywordtype">bool</span> completeFlush, <span class="keywordtype">int</span> propagation=-1);<a name="l00023"></a>00023         <span class="keywordtype">void</span> MessageEnd(<span class="keywordtype">int</span> propagation=-1);<a name="l00024"></a>00024         <span class="keywordtype">void</span> PutMessageEnd(<span class="keyword">const</span> byte *inString, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> propagation=-1);<a name="l00025"></a>00025         <span class="keywordtype">void</span> MessageSeriesEnd(<span class="keywordtype">int</span> propagation=-1);<a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="keyword">private</span>:<a name="l00028"></a>00028         <span class="keyword">typedef</span> std::pair&lt;BufferedTransformation *, std::string&gt; Route;<a name="l00029"></a>00029         <span class="keyword">struct </span>RangeRoute<a name="l00030"></a>00030         {<a name="l00031"></a>00031                 RangeRoute(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> end, <span class="keyword">const</span> Route &amp;route)<a name="l00032"></a>00032                         : begin(begin), end(end), route(route) {}<a name="l00033"></a>00033                 <span class="keywordtype">bool</span> <a class="code" href="gf2n_8h.html#f81f67e93bfb8bbb776cab689c83c7e9" title="compares degree">operator&lt;</a>(<span class="keyword">const</span> RangeRoute &amp;rhs)<span class="keyword"> const </span>{<span class="keywordflow">return</span> begin &lt; rhs.begin;}<a name="l00034"></a>00034                 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> begin, end;<a name="l00035"></a>00035                 Route route;<a name="l00036"></a>00036         };<a name="l00037"></a>00037 <a name="l00038"></a>00038         <span class="keyword">typedef</span> std::list&lt;RangeRoute&gt; RouteList;<a name="l00039"></a>00039         <span class="keyword">typedef</span> std::list&lt;Route&gt; DefaultRouteList;<a name="l00040"></a>00040 <a name="l00041"></a>00041         RouteList m_routes;<a name="l00042"></a>00042         DefaultRouteList m_defaultRoutes;<a name="l00043"></a>00043         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_nCurrentMessage;<a name="l00044"></a>00044 };<a name="l00045"></a>00045 <span class="preprocessor">#endif</span><a name="l00046"></a>00046 <span class="preprocessor"></span><a name="l00047"></a><a class="code" href="class_channel_switch_typedefs.html">00047</a> <span class="keyword">class </span><a class="code" href="class_channel_switch_typedefs.html">ChannelSwitchTypedefs</a><a name="l00048"></a>00048 {<a name="l00049"></a>00049 <span class="keyword">public</span>:<a name="l00050"></a><a class="code" href="class_channel_switch_typedefs.html#6c3a9f4fbf9e2a83bdd72d28afda897f">00050</a>         <span class="keyword">typedef</span> std::pair&lt;BufferedTransformation *, std::string&gt; <a class="code" href="class_channel_switch_typedefs.html#6c3a9f4fbf9e2a83bdd72d28afda897f">Route</a>;<a name="l00051"></a><a class="code" href="class_channel_switch_typedefs.html#3d8fc0d570dbae4ded006e88226d5771">00051</a>         <span class="keyword">typedef</span> std::multimap&lt;std::string, Route&gt; <a class="code" href="class_channel_switch_typedefs.html#3d8fc0d570dbae4ded006e88226d5771">RouteMap</a>;<a name="l00052"></a>00052 <a name="l00053"></a><a class="code" href="class_channel_switch_typedefs.html#682b7749e2ce307e095e389ab63aa3b7">00053</a>         <span class="keyword">typedef</span> std::pair&lt;BufferedTransformation *, value_ptr&lt;std::string&gt; &gt; <a class="code" href="class_channel_switch_typedefs.html#682b7749e2ce307e095e389ab63aa3b7">DefaultRoute</a>;<a name="l00054"></a><a class="code" href="class_channel_switch_typedefs.html#11ae9855b128a98f9bfed9d6413dcca0">00054</a>         <span class="keyword">typedef</span> std::list&lt;DefaultRoute&gt; <a class="code" href="class_channel_switch_typedefs.html#11ae9855b128a98f9bfed9d6413dcca0">DefaultRouteList</a>;

⌨️ 快捷键说明

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