📄 classpintcondmutex.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>PIntCondMutex 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>PIntCondMutex Class Reference</h1><code>#include <<a class="el" href="syncthrd_8h-source.html">syncthrd.h</a>></code><p><p>Inheritance diagram for PIntCondMutex:<p><center><img src="classPIntCondMutex.png" usemap="#PIntCondMutex_map" border="0" alt=""></center><map name="PIntCondMutex_map"><area href="classPCondMutex.html" alt="PCondMutex" shape="rect" coords="0,168,97,192"><area href="classPMutex.html" alt="PMutex" shape="rect" coords="0,112,97,136"><area href="classPSemaphore.html" alt="PSemaphore" shape="rect" coords="0,56,97,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,97,24"></map><a href="classPIntCondMutex-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Construction</h2></td></tr><tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z413_0">Operation</a> { <br> <a class="el" href="classPIntCondMutex.html#z413_0s0">LT</a>, <a class="el" href="classPIntCondMutex.html#z413_0s1">LE</a>, <a class="el" href="classPIntCondMutex.html#z413_0s2">EQ</a>, <a class="el" href="classPIntCondMutex.html#z413_0s3">GE</a>, <br> <a class="el" href="classPIntCondMutex.html#z413_0s4">GT</a><br> }</td></tr><tr><td> </td><td><font size=-1><em>defines possible operators on current value and target value</em> <a href="#z413_0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z413_1">PIntCondMutex</a> (int <a class="el" href="classPIntCondMutex.html#n0">value</a>=0, int <a class="el" href="classPIntCondMutex.html#n1">target</a>=0, <a class="el" href="classPIntCondMutex.html#z413_0">Operation</a> <a class="el" href="classPIntCondMutex.html#n2">operation</a>=LE)</td></tr><tr><td colspan=2><br><h2>Public Types</h2></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject</div></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z415_0">PrintOn</a> (ostream &strm) const</td></tr><tr><td colspan="2"><div class="groupHeader">Condition access functions</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_0">Condition</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_1">operator int</a> () const</td></tr><tr><td nowrap align=right valign=top>PIntCondMutex & </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_2">operator=</a> (int newval)</td></tr><tr><td nowrap align=right valign=top>PIntCondMutex & </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_3">operator++</a> ()</td></tr><tr><td nowrap align=right valign=top>PIntCondMutex & </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_4">operator+=</a> (int inc)</td></tr><tr><td nowrap align=right valign=top>PIntCondMutex & </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_5">operator--</a> ()</td></tr><tr><td nowrap align=right valign=top>PIntCondMutex & </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#z417_6">operator-=</a> (int dec)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#n0">value</a></td></tr><tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#n1">target</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIntCondMutex.html#z413_0">Operation</a> </td><td valign=bottom><a class="el" href="classPIntCondMutex.html#n2">operation</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This is a <a class="el" href="classPCondMutex.html">PCondMutex</a> for which the conditional is the value of an integer. <p><hr><h2>Member Enumeration Documentation</h2><a name="z413_0" doxytag="PIntCondMutex::Operation"></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"> enum PIntCondMutex::Operation </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>defines possible operators on current value and target value<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="z413_0s0" doxytag="LT"></a><em>LT</em></em> </td><td>Less than.</td></tr><tr><td valign=top><em><a name="z413_0s1" doxytag="LE"></a><em>LE</em></em> </td><td>Less than or equal to.</td></tr><tr><td valign=top><em><a name="z413_0s2" doxytag="EQ"></a><em>EQ</em></em> </td><td>Equal to.</td></tr><tr><td valign=top><em><a name="z413_0s3" doxytag="GE"></a><em>GE</em></em> </td><td>Greater than or equal to.</td></tr><tr><td valign=top><em><a name="z413_0s4" doxytag="GT"></a><em>GT</em></em> </td><td>Greater than.</td></tr></table></dl> </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a name="z413_1" doxytag="PIntCondMutex::PIntCondMutex"></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"> PIntCondMutex::PIntCondMutex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>value</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>target</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPIntCondMutex.html#z413_0">Operation</a> </td> <td class="mdname" nowrap> <em>operation</em> = LE</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 a cond mutex using an integer <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>target</em> </td><td>initial value if the integer </td></tr><tr><td valign=top><em>operation</em> </td><td>target vaue which causes the mutex to unlock comparison operator </td></tr></table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z417_0" doxytag="PIntCondMutex::Condition"></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 BOOL PIntCondMutex::Condition </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This is the condition that must be met for the <a class="el" href="classPCondMutex.html#a0">WaitCondition()</a> function to acquire the mutex.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if condition is met. </dl><p>Implements <a class="el" href="classPCondMutex.html#a2">PCondMutex</a>. </td> </tr></table><a name="z417_1" doxytag="PIntCondMutex::operator int"></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"> PIntCondMutex::operator int </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the current value of the condition variable. <dl compact><dt><b>Returns: </b></dt><dd>Current condition variable value. </dl> </td> </tr></table><a name="z417_3" doxytag="PIntCondMutex::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"> PIntCondMutex& PIntCondMutex::operator++ </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>Increment condition value. Use the <a class="el" href="classPSemaphore.html#z347_0">Wait()</a> function to acquire the mutex, modify the value, then release the mutex, possibly releasing the thread in the <a class="el" href="classPCondMutex.html#a0">WaitCondition()</a> function if the condition was met by the operation.<p><dl compact><dt><b>Returns: </b></dt><dd>The object reference for consecutive operations in the same statement. </dl> </td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -