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

📄 class_plugin_thread_pool_1_1_command.html

📁 用vc++写的一个简单的线程池的代码
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>ThreadPool: PluginThreadPool::Command&lt; T &gt; Class Template Reference</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.4.7 --><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 id="current"><a href="classes.html"><span>Classes</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><div class="nav"><a class="el" href="namespace_plugin_thread_pool.html">PluginThreadPool</a>::<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a></div><h1>PluginThreadPool::Command&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="PluginThreadPool::Command" --><a class="el" href="_command_8h.html">Command.h</a>: interface for the <a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a> class.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="_command_8h-source.html">Command.h</a>&gt;</code><p>Collaboration diagram for PluginThreadPool::Command&lt; T &gt;:<p><center><img src="class_plugin_thread_pool_1_1_command__coll__graph.jpg" border="0" usemap="#_plugin_thread_pool_1_1_command_3_01_t_01_4__coll__map" alt="Collaboration graph"></center><map name="_plugin_thread_pool_1_1_command_3_01_t_01_4__coll__map"><area href="class_plugin_thread_pool_1_1binder3.html" shape="rect" coords="293,96,691,123" alt=""><area href="class_plugin_thread_pool_1_1binder.html" shape="rect" coords="5,96,269,123" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_plugin_thread_pool_1_1_command-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#58aab3290ff60ca553e827432cfd2569">Command</a> (T *pObj, void(T::*p_method)(), long timeout, const char *key, long priority=<a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a>)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Takes the pointer to an object and a pointer to the method.  <a href="#58aab3290ff60ca553e827432cfd2569"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#eb21ebe43b54445c85844a6767c4b1c9">Command</a> (T *pObj, <a class="el" href="class_plugin_thread_pool_1_1binder.html">F0</a> *p_method, long timeout, const char *key, long priority=<a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a>)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#261bc0b38f8c4f79676d987da62f3202">Command</a> (T *pObj, <a class="el" href="class_plugin_thread_pool_1_1_command.html#85b52dc64e486eac2c2c4d9db92b9b3c">F1</a> *p_method, int par1, long timeout, const char *key, long priority=<a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a>)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#16303fccc096391663a44d236b7a6bb2">Command</a> (T *pObj, <a class="el" href="class_plugin_thread_pool_1_1binder3.html">F3</a> *p_method, long timeout, const char *key, long priority=<a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a>)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#bae83347a5d0fd5063355525f06a4ed0">execute</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calls the method of the object.  <a href="#bae83347a5d0fd5063355525f06a4ed0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#2830b94ad2a119732a997ee16caf71ac">GetTimeOut</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#febd44d2f529c23fe396c5b2b7b6371f">GetKey</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return a key associated with this command object  <a href="#febd44d2f529c23fe396c5b2b7b6371f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#c0f4bb7f637556ceabce1575f5ea6112">operator&lt;</a> (const <a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>&lt; T &gt; &amp;a) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#89490137659a8ff9d66c16eb7d72b0c5">~Command</a> ()</td></tr><tr><td colspan="2"><br><h2>Private Types</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="class_plugin_thread_pool_1_1binder.html">binder</a>&lt; std::mem_fun_t&lt;<br> int, T &gt;, T * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#eb0d44a1d64ed5e8ee8b15e069f31e89">F0</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::binder1st&lt; std::mem_fun1_t&lt;<br> int, T, int &gt; &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#85b52dc64e486eac2c2c4d9db92b9b3c">F1</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="class_plugin_thread_pool_1_1binder3.html">binder3</a>&lt; <a class="el" href="class_plugin_thread_pool_1_1mem__fun3__t.html">mem_fun3_t</a>&lt;<br> int, T, int, int, int &gt;,T *,<br>int, int, int &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#0f37693ab1e011ab30fe85abea2c9f00">F3</a></td></tr><tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#fddd2bd375dcf04591dd54a690ac8525">RSHash</a> (const std::string &amp;str)</td></tr><tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#960a60f376ad7a916bd3c97f11d2a824">m_objptr</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void(T::*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#7552d1a7c1afc09dcdd886e7ade68789">method</a> )()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_plugin_thread_pool_1_1binder.html">F0</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#09eb6f552921e01ef734cfb42790caa2">method0</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_plugin_thread_pool_1_1_command.html#85b52dc64e486eac2c2c4d9db92b9b3c">F1</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#5aaecab58914d6fca0996d12d5c802b9">method1</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_plugin_thread_pool_1_1binder3.html">F3</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#e81dab19d4e8944a4c349c220599946e">method3</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#0813562408adb30c60ad501c8b533b00">m_timeout</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#a79238db30e99d1c03f72050ba48a898">m_key</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#199d3a70de4ff59db4f85f09a9fe0bdf">m_value</a></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command.html#03e2cf02a2ff39a8d614d56bd0345682">m_par1</a></td></tr><tr><td colspan="2"><br><h2>Classes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_plugin_thread_pool_1_1_command_1_1_compare.html">Compare</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><h3>template&lt;typename T&gt;<br> class PluginThreadPool::Command&lt; T &gt;</h3><a class="el" href="_command_8h.html">Command.h</a>: interface for the <a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a> class. <p><p>Definition at line <a class="el" href="_command_8h-source.html#l00127">127</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<hr><h2>Member Typedef Documentation</h2><a class="anchor" name="eb0d44a1d64ed5e8ee8b15e069f31e89"></a><!-- doxytag: member="PluginThreadPool::Command::F0" ref="eb0d44a1d64ed5e8ee8b15e069f31e89" args="" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">typedef <a class="el" href="class_plugin_thread_pool_1_1binder.html">binder</a>&lt; std::mem_fun_t&lt;int,T&gt;, T* &gt; <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1binder.html">F0</a><code> [private]</code>          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00132">132</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.</div></div><p><a class="anchor" name="85b52dc64e486eac2c2c4d9db92b9b3c"></a><!-- doxytag: member="PluginThreadPool::Command::F1" ref="85b52dc64e486eac2c2c4d9db92b9b3c" args="" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">typedef std::binder1st&lt; std::mem_fun1_t&lt;int,T,int&gt; &gt; <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1_command.html#85b52dc64e486eac2c2c4d9db92b9b3c">F1</a><code> [private]</code>          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00136">136</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.</div></div><p><a class="anchor" name="0f37693ab1e011ab30fe85abea2c9f00"></a><!-- doxytag: member="PluginThreadPool::Command::F3" ref="0f37693ab1e011ab30fe85abea2c9f00" args="" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname">typedef <a class="el" href="class_plugin_thread_pool_1_1binder3.html">binder3</a>&lt;<a class="el" href="class_plugin_thread_pool_1_1mem__fun3__t.html">mem_fun3_t</a>&lt;int,T,int,int,int&gt; ,T* ,int,int,int&gt; <a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1binder3.html">F3</a><code> [private]</code>          </td>        </tr>      </table></div><div class="memdoc"><p><p>Definition at line <a class="el" href="_command_8h-source.html#l00138">138</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.</div></div><p><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="58aab3290ff60ca553e827432cfd2569"></a><!-- doxytag: member="PluginThreadPool::Command::Command" ref="58aab3290ff60ca553e827432cfd2569" args="(T *pObj, void(T::*p_method)(), long timeout, const char *key, long priority=PRIO_NORMAL)" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>           </td>          <td>(</td>          <td class="paramtype">T *&nbsp;</td>          <td class="paramname"> <em>pObj</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">void(T::*)()&nbsp;</td>          <td class="paramname"> <em>p_method</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>timeout</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>key</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>priority</em> = <code><a class="el" href="namespace_plugin_thread_pool.html#ce744b8830668fc53d7c97b3c77d7ce4">PRIO_NORMAL</a></code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inline, explicit]</code></td>        </tr>      </table></div><div class="memdoc"><p>Takes the pointer to an object and a pointer to the method. <p><p>Definition at line <a class="el" href="_command_8h-source.html#l00157">157</a> of file <a class="el" href="_command_8h-source.html">Command.h</a>.<p>References <a class="el" href="class_plugin_thread_pool_1_1_command.html#7552d1a7c1afc09dcdd886e7ade68789">PluginThreadPool::Command&lt; T &gt;::method</a>.</div></div><p><a class="anchor" name="eb21ebe43b54445c85844a6767c4b1c9"></a><!-- doxytag: member="PluginThreadPool::Command::Command" ref="eb21ebe43b54445c85844a6767c4b1c9" args="(T *pObj, F0 *p_method, long timeout, const char *key, long priority=PRIO_NORMAL)" --><div class="memitem"><div class="memproto"><div class="memtemplate">template&lt;typename T&gt; </div>      <table class="memname">        <tr>          <td class="memname"><a class="el" href="class_plugin_thread_pool_1_1_command.html">PluginThreadPool::Command</a>&lt; T &gt;::<a class="el" href="class_plugin_thread_pool_1_1_command.html">Command</a>           </td>          <td>(</td>          <td class="paramtype">T *&nbsp;</td>          <td class="paramname"> <em>pObj</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="class_plugin_thread_pool_1_1binder.html">F0</a> *&nbsp;</td>          <td class="paramname"> <em>p_method</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>timeout</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>key</em>, </td>        </tr>        <tr>

⌨️ 快捷键说明

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