📄 classpwaitandsignal.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>PWaitAndSignal 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> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PWaitAndSignal Class Reference</h1><code>#include <<a class="el" href="semaphor_8h-source.html">semaphor.h</a>></code><p><a href="classPWaitAndSignal-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> </td><td valign=bottom><a class="el" href="classPWaitAndSignal.html#a0">PWaitAndSignal</a> (const <a class="el" href="classPSemaphore.html">PSemaphore</a> &sem, BOOL wait=TRUE)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPWaitAndSignal.html#a1">~PWaitAndSignal</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPSemaphore.html">PSemaphore</a> & </td><td valign=bottom><a class="el" href="classPWaitAndSignal.html#n0">semaphore</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class waits for the semaphore on construction and automatically signals the semaphore on destruction. Any descendent of <a class="el" href="classPSemaphore.html">PSemaphore</a> may be used.<p>This is very usefull for constructs such as: \begin{verbatim} void func() { PWaitAndSignal mutexWait(myMutex); if (condition) return; do_something(); if (other_condition) return; do_something_else(); } \end{verbatim} <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PWaitAndSignal::PWaitAndSignal"></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"> PINLINE PWaitAndSignal::PWaitAndSignal </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPSemaphore.html">PSemaphore</a> & </td> <td class="mdname" nowrap> <em>sem</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>wait</em> = TRUE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create the semaphore wait instance. This will wait on the specified semaphore using the Wait()# function before returning. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>wait</em> </td><td>Semaphore descendent to wait/signal. Wait for semaphore before returning. </td></tr></table></dl> </td> </tr></table><a name="a1" doxytag="PWaitAndSignal::~PWaitAndSignal"></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"> PINLINE PWaitAndSignal::~PWaitAndSignal </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Signal the semaphore. This will execute the Signal() function on the semaphore that was used in the construction of this instance. </td> </tr></table><hr><h2>Member Data Documentation</h2><a name="n0" doxytag="PWaitAndSignal::semaphore"></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"> <a class="el" href="classPSemaphore.html">PSemaphore</a>& PWaitAndSignal::semaphore<code> [protected]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="semaphor_8h-source.html">semaphor.h</a><li><a class="el" href="osutil_8inl.html">osutil.inl</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:21 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 + -