channels_8h-source.html
来自「Crypto++是一个非常强大的密码学库,主要是功能全」· HTML 代码 · 共 105 行
HTML
105 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Crypto++: channels.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>channels.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_CHANNELS_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_CHANNELS_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include "<a class="code" href="simple_8h.html">simple.h</a>"</span>00005 <span class="preprocessor">#include "smartptr.h"</span>00006 <span class="preprocessor">#include <map></span>00007 <span class="preprocessor">#include <list></span>00008 00009 NAMESPACE_BEGIN(CryptoPP)00010 00011 #<span class="keywordflow">if</span> 0<span class="comment"></span>00012 <span class="comment">//! Route input on default channel to different and/or multiple channels based on message sequence number</span>00013 <span class="comment"></span><span class="keyword">class </span>MessageSwitch : <span class="keyword">public</span> <a class="code" href="class_sink.html">Sink</a>00014 {00015 <span class="keyword">public</span>:00016 <span class="keywordtype">void</span> AddDefaultRoute(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &channel);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">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &channel);00018 00019 <span class="keywordtype">void</span> <a class="code" href="class_buffered_transformation.html#_zlib_decompressorz1_0">Put</a>(byte inByte);00020 <span class="keywordtype">void</span> <a class="code" href="class_buffered_transformation.html#_zlib_decompressorz1_0">Put</a>(<span class="keyword">const</span> byte *inString, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length);00021 00022 <span class="keywordtype">void</span> <a class="code" href="class_buffered_transformation.html#_windows_pipe_sinkz5_3">Flush</a>(<span class="keywordtype">bool</span> completeFlush, <span class="keywordtype">int</span> propagation=-1);00023 <span class="keywordtype">void</span> MessageEnd(<span class="keywordtype">int</span> propagation=-1);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);00025 <span class="keywordtype">void</span> <a class="code" href="class_buffered_transformation.html#_windows_pipe_sinkz5_4">MessageSeriesEnd</a>(<span class="keywordtype">int</span> propagation=-1);00026 00027 <span class="keyword">private</span>:00028 <span class="keyword">typedef</span> std::pair<BufferedTransformation *, std::string> Route;00029 <span class="keyword">struct </span>RangeRoute00030 {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 &route)00032 : begin(begin), end(end), route(route) {}00033 <span class="keywordtype">bool</span> operator<(<span class="keyword">const</span> RangeRoute &rhs)<span class="keyword"> const </span>{<span class="keywordflow">return</span> begin < rhs.begin;}00034 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> begin, end;00035 Route route;00036 };00037 00038 <span class="keyword">typedef</span> std::list<RangeRoute> RouteList;00039 <span class="keyword">typedef</span> std::list<Route> DefaultRouteList;00040 00041 RouteList m_routes;00042 DefaultRouteList m_defaultRoutes;00043 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_nCurrentMessage;00044 };00045 <span class="preprocessor">#endif</span>00046 <span class="preprocessor"></span><span class="comment"></span>00047 <span class="comment">//! Route input to different and/or multiple channels based on channel ID</span><a name="l00048"></a><a class="code" href="class_channel_switch.html">00048</a> <span class="comment"></span><span class="keyword">class </span>CRYPTOPP_DLL ChannelSwitch : <span class="keyword">public</span> Multichannel<Sink>00049 {00050 <span class="keyword">public</span>:00051 ChannelSwitch() {}00052 ChannelSwitch(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination)00053 {00054 AddDefaultRoute(destination);00055 }00056 ChannelSwitch(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &outChannel)00057 {00058 AddDefaultRoute(destination, outChannel);00059 }00060 00061 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ChannelPut2(<span class="keyword">const</span> std::string &channel, <span class="keyword">const</span> byte *begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00062 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ChannelPutModifiable2(<span class="keyword">const</span> std::string &channel, byte *begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00063 00064 <span class="keywordtype">void</span> ChannelInitialize(<span class="keyword">const</span> std::string &channel, <span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &parameters=g_nullNameValuePairs, <span class="keywordtype">int</span> propagation=-1);00065 <span class="keywordtype">bool</span> ChannelFlush(<span class="keyword">const</span> std::string &channel, <span class="keywordtype">bool</span> completeFlush, <span class="keywordtype">int</span> propagation=-1, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>);00066 <span class="keywordtype">bool</span> ChannelMessageSeriesEnd(<span class="keyword">const</span> std::string &channel, <span class="keywordtype">int</span> propagation=-1, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>);00067 00068 byte * ChannelCreatePutSpace(<span class="keyword">const</span> std::string &channel, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &size);00069 00070 <span class="keywordtype">void</span> AddDefaultRoute(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination);00071 <span class="keywordtype">void</span> RemoveDefaultRoute(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination);00072 <span class="keywordtype">void</span> AddDefaultRoute(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &outChannel);00073 <span class="keywordtype">void</span> RemoveDefaultRoute(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &outChannel);00074 <span class="keywordtype">void</span> AddRoute(<span class="keyword">const</span> std::string &inChannel, <a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &outChannel);00075 <span class="keywordtype">void</span> RemoveRoute(<span class="keyword">const</span> std::string &inChannel, <a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &destination, <span class="keyword">const</span> std::string &outChannel);00076 00077 <span class="keyword">private</span>:00078 <span class="keyword">typedef</span> std::pair<BufferedTransformation *, std::string> Route;00079 <span class="keyword">typedef</span> std::multimap<std::string, Route> RouteMap;00080 RouteMap m_routeMap;00081 00082 <span class="keyword">typedef</span> std::pair<BufferedTransformation *, value_ptr<std::string> > DefaultRoute;00083 <span class="keyword">typedef</span> std::list<DefaultRoute> DefaultRouteList;00084 DefaultRouteList m_defaultRoutes;00085 00086 <span class="keyword">friend</span> <span class="keyword">class </span>ChannelRouteIterator;00087 };00088 00089 NAMESPACE_END00090 00091 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:10 2003 for Crypto++ by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?