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

📄 classpnotifier.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>PNotifier 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>PNotifier Class Reference</h1><code>#include &lt;<a class="el" href="notifier_8h-source.html">notifier.h</a>&gt;</code><p><p>Inheritance diagram for PNotifier:<p><center><img src="classPNotifier.png" usemap="#PNotifier_map" border="0" alt=""></center><map name="PNotifier_map"><area href="classPSmartPointer.html" alt="PSmartPointer" shape="rect" coords="0,56,92,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,92,24"></map><a href="classPNotifier-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="classPNotifier.html#a0">PNotifier</a> (<a class="el" href="classPNotifierFunction.html">PNotifierFunction</a> *func=NULL)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPNotifier.html#a1">operator()</a> (<a class="el" href="classPObject.html">PObject</a> &amp;notifier, INT extra) const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class is the <a class="el" href="classPSmartPointer.html#z363_0">PSmartPointer</a># to the PNotifierFunction# class.<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="PNotifier::PNotifier"></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"> PNotifier::PNotifier </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPNotifierFunction.html">PNotifierFunction</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>func</em> = NULL          </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 new notification function smart pointer. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>func</em>&nbsp;</td><td>Notifier function to call. </td></tr></table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a1" doxytag="PNotifier::operator()"></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 PNotifier::operator() </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> [inline, 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. This will make a polymorphic call to the function declared by the <a class="el" href="notifier_8h.html#a0">PDECLARE_NOTIFIER</a># macro which in turn calls the required function in the destination 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>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 + -