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

📄 notifier_8h.html

📁 pwlib开发文档
💻 HTML
字号:
<!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>notifier.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>notifier.h File Reference</h1><code>#include &lt;ptlib.h&gt;</code><br><code>#include &lt;<a class="el" href="smartptr_8h-source.html">ptlib/smartptr.h</a>&gt;</code><br><p><a href="notifier_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Compounds</h2></td></tr><tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classPNotifier.html">PNotifier</a></td></tr><tr><td nowrap align=right valign=top>class &nbsp;</td><td valign=bottom><a class="el" href="classPNotifierFunction.html">PNotifierFunction</a></td></tr><tr><td colspan=2><br><h2>Defines</h2></td></tr><tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="notifier_8h.html#a0">PDECLARE_NOTIFIER</a>(notifier, notifiee, func)</td></tr><tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="notifier_8h.html#a1">PCREATE_NOTIFIER2</a>(obj, func)&nbsp;&nbsp;&nbsp;<a class="el" href="classPNotifier.html">PNotifier</a>(new func##_PNotifier(obj))</td></tr><tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="notifier_8h.html#a2">PCREATE_NOTIFIER</a>(func)&nbsp;&nbsp;&nbsp;PCREATE_NOTIFIER2(this, func)</td></tr></table><hr><h2>Define Documentation</h2><a name="a2" doxytag="notifier.h::PCREATE_NOTIFIER"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PCREATE_NOTIFIER</td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">func&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;PCREATE_NOTIFIER2(this, func)      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a notifier object instance. This macro creates an instance of the particular PNotifier# class using the func# parameter as the member function to call.<p>The this# object is used as the instance to call the function against. The <a class="el" href="notifier_8h.html#a1">PCREATE_NOTIFIER2</a># macro may be used if the instance to be called is not the current object instance.     </td>  </tr></table><a name="a1" doxytag="notifier.h::PCREATE_NOTIFIER2"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PCREATE_NOTIFIER2</td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">obj,         <tr>          <td></td>          <td></td>          <td class="md" nowrap>func&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;<a class="el" href="classPNotifier.html">PNotifier</a>(new func##_PNotifier(obj))      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a notifier object instance. This macro creates an instance of the particular PNotifier# class using the func# parameter as the member function to call.<p>The obj# parameter is the instance to call the function against. If the instance to be called is the current instance, ie obj# is to this# the the <a class="el" href="notifier_8h.html#a2">PCREATE_NOTIFIER</a># macro should be used.     </td>  </tr></table><a name="a0" doxytag="notifier.h::PDECLARE_NOTIFIER"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> #define PDECLARE_NOTIFIER</td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">notifier,         <tr>          <td></td>          <td></td>          <td class="md" nowrap>notifiee,         <tr>          <td></td>          <td></td>          <td class="md" nowrap>func&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><b>Value:</b><div class="fragment"><pre><span class="keyword">class </span>func##_PNotifier : <span class="keyword">public</span> <a class="code" href="classPNotifierFunction.html">PNotifierFunction</a> { \    <span class="keyword">public</span>: \      func##_PNotifier(notifiee * obj) : <a class="code" href="classPNotifierFunction.html">PNotifierFunction</a>(obj) { } \      <span class="keyword">virtual</span> <span class="keywordtype">void</span> Call(<a class="code" href="classPObject.html">PObject</a> &amp; note, INT extra) <span class="keyword">const</span> \        { ((notifiee*)object)-&gt;func((notifier &amp;)note, extra); } \  }; \  <span class="keyword">friend</span> <span class="keyword">class </span>func##_PNotifier; \  <span class="keyword">virtual</span> <span class="keywordtype">void</span> func(notifier &amp; note, INT extra)</pre></div>Declare a notifier object class. This macro declares the descendent class of PNotifierFunction# that will be used in instances of PNotifier# created by the <a class="el" href="notifier_8h.html#a2">PCREATE_NOTIFIER</a># or <a class="el" href="notifier_8h.html#a1">PCREATE_NOTIFIER2</a># macros.<p>The macro is expected to be used inside a class declaration. The class it declares will therefore be a nested class within the class being declared. The name of the new nested class is derived from the member function name which should guarentee the class names are unique.<p>The notifier# parameter is the class of the function that will be calling the notification function. The notifiee# parameter is the class to which the called member function belongs. Finally the func# parameter is the name of the member function to be declared.<p>This macro will also declare the member function itself. This will be: \begin{verbatim} void func(notifier &amp; n, INT extra) \end{verbatim}<p>The implementation of the function is left for the user.     </td>  </tr></table><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:12 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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