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

📄 classpnotifierfunction.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>PNotifierFunction class 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>PNotifierFunction Class Reference</h1><code>#include &lt;<a class="el" href="notifier_8h-source.html">notifier.h</a>&gt;</code><p><p>Inheritance diagram for PNotifierFunction:<p><center><img src="classPNotifierFunction.png" usemap="#PNotifierFunction_map" border="0" alt=""></center><map name="PNotifierFunction_map"><area href="classPSmartObject.html" alt="PSmartObject" shape="rect" coords="0,56,142,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,142,24"><area href="classPSmartNotifierFunction.html" alt="PSmartNotifierFunction" shape="rect" coords="0,168,142,192"></map><a href="classPNotifierFunction-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 Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPNotifierFunction.html#a0">PNotifierFunction</a> (void *obj)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Create a notification function instance.</em> <a href="#a0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPNotifierFunction.html#a1">Call</a> (<a class="el" href="classPObject.html">PObject</a> &amp;notifier, INT extra) const=0</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="classPNotifierFunction.html#n0">object</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class is the <a class="el" href="classPSmartObject.html#a0">PSmartObject</a># contents of the PNotifier# class.<p>This is an abstract class for which a descendent is declared for every function that may be called. The <a class="el" href="notifier_8h.html#a0">PDECLARE_NOTIFIER</a># macro makes this declaration.<p>The PNotifier# and PNotifierFunction classes build a completely type safe mechanism for calling arbitrary member functions on classes. The "pointer to a member function" capability built into C++ makes the assumption that the function name exists in an ancestor class. If you wish to call a member function name that does {\bf not} exist in any ancestor class, very type unsafe casting of the member functions must be made. Some compilers will even refuse to do it at all!<p>To overcome this problem, as this mechanism is highly desirable for callback functions in the GUI part of the PWLib library, these classes and a macro are used to create all the classes and declarations to use polymorphism as the link between the caller, which has no knowledege of the function, and the receiver object and member function.<p>This is most often used as the notification of actions being take by interactors in the PWLib library. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="PNotifierFunction::PNotifierFunction"></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"> PNotifierFunction::PNotifierFunction </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>obj</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a notification function instance.<p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em>&nbsp;</td><td>Object instance that the function will be called on. </td></tr></table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a1" doxytag="PNotifierFunction::Call"></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"> virtual void PNotifierFunction::Call </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPObject.html">PObject</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>notifier</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>INT&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>extra</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"> const<code> [pure virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Execute the call to the actual notification function on the object instance contained in this object. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>extra</em>&nbsp;</td><td>Object that is making the notification. Extra information that may be passed to function. </td></tr></table></dl>    </td>  </tr></table><hr><h2>Member Data Documentation</h2><a name="n0" doxytag="PNotifierFunction::object"></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"> void* PNotifierFunction::object<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Object instance to receive the notification function call.     </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="notifier_8h-source.html">notifier.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:18 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 + -