Sophie

Sophie

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

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::LockedPointer 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="a00072.html">LockedPointer</a>
  </div>
</div>
<div class="contents">
<h1>ucommon::LockedPointer Class Reference</h1><!-- doxytag: class="ucommon::LockedPointer" -->
<p>An object pointer that uses mutex to assure thread-safe singleton use.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00202_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucommon::LockedPointer:</div>
<div class="dynsection">
<div class="center"><img src="a00419.png" border="0" usemap="#ucommon_1_1_locked_pointer_inherit__map" alt="Inheritance graph"/></div>
<map name="ucommon_1_1_locked_pointer_inherit__map" id="ucommon_1_1_locked_pointer_inherit__map">
<area shape="rect" id="node3" href="a00070.html" title="Templated locked pointer for referencing locked objects of specific type." alt="" coords="5,80,307,107"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucommon::LockedPointer:</div>
<div class="dynsection">
<div class="center"><img src="a00420.png" border="0" usemap="#ucommon_1_1_locked_pointer_coll__map" alt="Collaboration graph"/></div>
<map name="ucommon_1_1_locked_pointer_coll__map" id="ucommon_1_1_locked_pointer_coll__map">
<area shape="rect" id="node2" href="a00095.html" title="A common base class for all managed objects." alt="" coords="5,5,256,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>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a9117df5766060e7db0d0dadaa27c7bcd">dup</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a duplicate reference counted instance of the current object.  <a href="#a9117df5766060e7db0d0dadaa27c7bcd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9488f5cabc5189a204930b33fed3f747"></a><!-- doxytag: member="ucommon::LockedPointer::LockedPointer" ref="a9488f5cabc5189a204930b33fed3f747" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a9488f5cabc5189a204930b33fed3f747">LockedPointer</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an instance of a locked pointer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#abf806d21b405e05122b40f09024f5521">operator=</a> (<a class="el" href="a00095.html">ObjectProtocol</a> *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replace existing object through assignment.  <a href="#abf806d21b405e05122b40f09024f5521"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#ac77018d938447724e1772125914b1172">replace</a> (<a class="el" href="a00095.html">ObjectProtocol</a> *object)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replace existing object with a new one for next request.  <a href="#ac77018d938447724e1772125914b1172"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91d08dfb02dbbdb15caab4ae0504eb59"></a><!-- doxytag: member="ucommon::LockedPointer::locked_release" ref="a91d08dfb02dbbdb15caab4ae0504eb59" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>locked_release</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>An object pointer that uses mutex to assure thread-safe singleton use. </p>
<p>This class is used to support a threadsafe replacable pointer to a object. This class is used to form and support the templated <a class="el" href="a00070.html" title="Templated locked pointer for referencing locked objects of specific type.">locked_pointer</a> class and used with the <a class="el" href="a00071.html" title="Auto-pointer support class for locked objects.">locked_release</a> class. An example of where this might be used is in config file parsers, where a seperate thread may process and generate a new config object for new threads to refernce, while the old configuration continues to be used by a reference counted instance that goes away when it falls out of scope. </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="a00202_source.html#l01368">1368</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9117df5766060e7db0d0dadaa27c7bcd"></a><!-- doxytag: member="ucommon::LockedPointer::dup" ref="a9117df5766060e7db0d0dadaa27c7bcd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00095.html">ObjectProtocol</a>* ucommon::LockedPointer::dup </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a duplicate reference counted instance of the current object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>duplicate reference counted object. </dd></dl>

<p>Reimplemented in <a class="el" href="a00070.html#af7b03d55138605c133804ab754d1c1db">ucommon::locked_pointer&lt; T &gt;</a>.</p>

</div>
</div>
<a class="anchor" id="abf806d21b405e05122b40f09024f5521"></a><!-- doxytag: member="ucommon::LockedPointer::operator=" ref="abf806d21b405e05122b40f09024f5521" args="(ObjectProtocol *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::LockedPointer::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replace existing object through assignment. </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>to assign. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="a00202_source.html#l01397">1397</a> of file <a class="el" href="a00202_source.html">thread.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac77018d938447724e1772125914b1172"></a><!-- doxytag: member="ucommon::LockedPointer::replace" ref="ac77018d938447724e1772125914b1172" args="(ObjectProtocol *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucommon::LockedPointer::replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00095.html">ObjectProtocol</a> *&nbsp;</td>
          <td class="paramname"> <em>object</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replace existing object with a new one for next request. </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>to register with pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00202_source.html">thread.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jul 14 16:39:42 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>