Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 4f5f2dc0f55b453456458df885792b0b > files > 101

ucommon-doc-5.0.4-1mdv2010.2.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ucommon: ucommon::exclusive_lock Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00208.html">ucommon</a>::<a class="el" href="a00048.html">exclusive_lock</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::exclusive_lock Class Reference</h1><!-- doxytag: class="ucommon::exclusive_lock" -->
<p>A kind of smart pointer object to support exclusive locking protocol.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00177_source.html">access.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ucommon::exclusive_lock:</div>
<div class="dynsection">
<div class="center"><img src="a00379.png" border="0" usemap="#ucommon_1_1exclusive__lock_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1exclusive__lock_coll__map" id="ucommon_1_1exclusive__lock_coll__map">
<area shape="rect" id="node2" href="a00049.html" title="An exclusive locking protocol interface base." alt="" coords="5,5,288,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#a7f9e7090e7766da52c0605aa9f6133bc">exclusive_lock</a> (<a class="el" href="a00049.html">ExclusiveProtocol</a> *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an instance of an exclusive object reference.  <a href="#a7f9e7090e7766da52c0605aa9f6133bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#af679076ecdf5b5dbf40f8e80990f4939">operator bool</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test if the reference holds an active lock.  <a href="#af679076ecdf5b5dbf40f8e80990f4939"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#ae4bf8b4b8628aa9903bb63d7b3ada5e9">operator!</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test if the reference holds an active lock.  <a href="#ae4bf8b4b8628aa9903bb63d7b3ada5e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#af482434acdffdbf45128c0790940525a">release</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release a held lock programmatically.  <a href="#af482434acdffdbf45128c0790940525a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad25d0ecc1dd9b0a4dd537c89aa15d890"></a><!-- doxytag: member="ucommon::exclusive_lock::~exclusive_lock" ref="ad25d0ecc1dd9b0a4dd537c89aa15d890" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#ad25d0ecc1dd9b0a4dd537c89aa15d890">~exclusive_lock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy reference to exclusively locked object, release lock. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A kind of smart pointer object to support exclusive locking protocol. </p>
<p>This object initiates an exclusive lock for the object being referenced when it is instantiated, and releases the exclusive lock when it is destroyed. You would pass the pointer an object that has the Exclusive as a base class. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00177_source.html#l00126">126</a> of file <a class="el" href="a00177_source.html">access.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7f9e7090e7766da52c0605aa9f6133bc"></a><!-- doxytag: member="ucommon::exclusive_lock::exclusive_lock" ref="a7f9e7090e7766da52c0605aa9f6133bc" args="(ExclusiveProtocol *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucommon::exclusive_lock::exclusive_lock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00049.html">ExclusiveProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create an instance of an exclusive object reference. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>containing Exclusive base class protocol to lock. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af679076ecdf5b5dbf40f8e80990f4939"></a><!-- doxytag: member="ucommon::exclusive_lock::operator bool" ref="af679076ecdf5b5dbf40f8e80990f4939" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucommon::exclusive_lock::operator bool </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test if the reference holds an active lock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if locking an object. </dd></dl>

<p>Definition at line <a class="el" href="a00177_source.html#l00154">154</a> of file <a class="el" href="a00177_source.html">access.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00048_af679076ecdf5b5dbf40f8e80990f4939_cgraph.png" border="0" usemap="#a00048_af679076ecdf5b5dbf40f8e80990f4939_cgraph_map" alt=""></div>
<map name="a00048_af679076ecdf5b5dbf40f8e80990f4939_cgraph_map" id="a00048_af679076ecdf5b5dbf40f8e80990f4939_cgraph">
<area shape="rect" id="node3" href="a00208.html#a93b9eec9d0b7db95ce778265f806afd6" title="Convenience function to exclusively lock an object through it&#39;s protocol." alt="" coords="456,5,608,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae4bf8b4b8628aa9903bb63d7b3ada5e9"></a><!-- doxytag: member="ucommon::exclusive_lock::operator!" ref="ae4bf8b4b8628aa9903bb63d7b3ada5e9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucommon::exclusive_lock::operator! </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test if the reference holds an active lock. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if is not locking an object. </dd></dl>

<p>Definition at line <a class="el" href="a00177_source.html#l00147">147</a> of file <a class="el" href="a00177_source.html">access.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<div class="center"><img src="a00048_ae4bf8b4b8628aa9903bb63d7b3ada5e9_cgraph.png" border="0" usemap="#a00048_ae4bf8b4b8628aa9903bb63d7b3ada5e9_cgraph_map" alt=""></div>
<map name="a00048_ae4bf8b4b8628aa9903bb63d7b3ada5e9_cgraph_map" id="a00048_ae4bf8b4b8628aa9903bb63d7b3ada5e9_cgraph">
<area shape="rect" id="node3" href="a00208.html#a93b9eec9d0b7db95ce778265f806afd6" title="Convenience function to exclusively lock an object through it&#39;s protocol." alt="" coords="416,5,568,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af482434acdffdbf45128c0790940525a"></a><!-- doxytag: member="ucommon::exclusive_lock::release" ref="af482434acdffdbf45128c0790940525a" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::exclusive_lock::release </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Release a held lock programmatically. </p>
<p>This can be used to de-reference the object being exclusively locked without having to wait for the destructor to be called when the <a class="el" href="a00048.html" title="A kind of smart pointer object to support exclusive locking protocol.">exclusive_lock</a> falls out of scope. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00177_source.html">access.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:35 2011 for ucommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>