Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 64656f00434e190abe8506174ca339ed > files > 381

ucommon-doc-4.3.1-1.mga1.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: ReusableAllocator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ucommon</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00112.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<h1>ReusableAllocator Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="ReusableAllocator" --><!-- doxytag: inherits="Conditional" -->
<p>Class for resource bound memory pools between threads.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00200_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ReusableAllocator:</div>
<div class="dyncontent">
<div class="center"><img src="a00417.png" border="0" usemap="#_reusable_allocator_inherit__map" alt="Inheritance graph"/></div>
<map name="_reusable_allocator_inherit__map" id="_reusable_allocator_inherit__map">
<area shape="rect" id="node5" href="a00014.html" title="An array of reusable objects." alt="" coords="64,155,187,181"/><area shape="rect" id="node9" href="a00076.html" title="Map a reusable allocator over a named shared memory segment." alt="" coords="241,155,372,181"/><area shape="rect" id="node13" href="a00104.html" title="A mempager source of reusable objects." alt="" coords="425,155,548,181"/><area shape="rect" id="node2" href="a00034.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="241,5,372,32"/><area shape="rect" id="node7" href="a00013.html" title="An array of reusable types." alt="" coords="5,229,187,256"/><area shape="rect" id="node11" href="a00073.html" title="Template class to map typed reusable objects into shared memory heap." alt="" coords="211,229,403,256"/><area shape="rect" id="node15" href="a00100.html" title="A reusable private pool of reusable types." alt="" coords="427,229,608,256"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ReusableAllocator:</div>
<div class="dyncontent">
<div class="center"><img src="a00418.png" border="0" usemap="#_reusable_allocator_coll__map" alt="Collaboration graph"/></div>
<map name="_reusable_allocator_coll__map" id="_reusable_allocator_coll__map">
<area shape="rect" id="node2" href="a00034.html" title="The conditional is a common base for other thread synchronizing classes." alt="" coords="5,176,136,203"/><area shape="rect" id="node4" href="a00113.html" title="Reusable objects for forming private heaps." alt="" coords="160,176,323,203"/><area shape="rect" id="node6" href="a00065.html" title="Common base class for all objects that can be formed into a linked list." alt="" coords="171,91,312,117"/><area shape="rect" id="node8" href="a00091.html" title="A common base class for all managed objects." alt="" coords="200,5,283,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00113.html">ReusableObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html#a92dfe33ac8d7d3ee907a9b7793457eea">next</a> (<a class="el" href="a00113.html">ReusableObject</a> *object)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get next reusable object in the pool.  <a href="#a92dfe33ac8d7d3ee907a9b7793457eea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html#a3293839b9ac922b7b4ccab479ce64dcd">release</a> (<a class="el" href="a00113.html">ReusableObject</a> *object)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Release resuable object.  <a href="#a3293839b9ac922b7b4ccab479ce64dcd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00112.html#afd98072283970e7201d44fb9627648de">ReusableAllocator</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize reusable allocator through a conditional.  <a href="#afd98072283970e7201d44fb9627648de"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c7caa496e0d5c649f31fc2ed95c6f43"></a><!-- doxytag: member="ReusableAllocator::freelist" ref="a6c7caa496e0d5c649f31fc2ed95c6f43" args="" -->
<a class="el" href="a00113.html">ReusableObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>freelist</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2b8b9391ba2bbfd69d6e73b14cd0bd9"></a><!-- doxytag: member="ReusableAllocator::waiting" ref="ac2b8b9391ba2bbfd69d6e73b14cd0bd9" args="" -->
unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>waiting</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class for resource bound memory pools between threads. </p>
<p>This is used to support a memory pool allocation scheme where a pool of reusable objects may be allocated, and the pool renewed by releasing objects or back. When the pool is used up, a pool consuming thread then must wait for a resource to be freed by another consumer (or timeout). This class is not meant to be used directly, but rather to build the synchronizing control between consumers which might be forced to wait for a resource. </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="a00200_source.html#l00761">761</a> of file <a class="el" href="a00200_source.html">thread.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afd98072283970e7201d44fb9627648de"></a><!-- doxytag: member="ReusableAllocator::ReusableAllocator" ref="afd98072283970e7201d44fb9627648de" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ReusableAllocator::ReusableAllocator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize reusable allocator through a conditional. </p>
<p>Zero free list. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a92dfe33ac8d7d3ee907a9b7793457eea"></a><!-- doxytag: member="ReusableAllocator::next" ref="a92dfe33ac8d7d3ee907a9b7793457eea" args="(ReusableObject *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00113.html">ReusableObject</a>* ReusableAllocator::next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00113.html">ReusableObject</a> *&#160;</td>
          <td class="paramname"><em>object</em></td><td>)</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get next reusable object in the pool. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>from list. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>next object. </dd></dl>

<p>Definition at line <a class="el" href="a00200_source.html#l00777">777</a> of file <a class="el" href="a00200_source.html">thread.h</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="a00112_a92dfe33ac8d7d3ee907a9b7793457eea_cgraph.png" border="0" usemap="#a00112_a92dfe33ac8d7d3ee907a9b7793457eea_cgraph" alt=""/></div>
<map name="a00112_a92dfe33ac8d7d3ee907a9b7793457eea_cgraph" id="a00112_a92dfe33ac8d7d3ee907a9b7793457eea_cgraph">
<area shape="rect" id="node3" href="a00113.html#adaf196c8e959596c86d7f7f9f95735fe" title="Get next effective reusable object when iterating." alt="" coords="308,5,559,32"/><area shape="rect" id="node5" href="a00065.html#ac49c372488faf0551eeb27f9eedaaac6" title="Get next effective object when iterating." alt="" coords="608,5,840,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a3293839b9ac922b7b4ccab479ce64dcd"></a><!-- doxytag: member="ReusableAllocator::release" ref="a3293839b9ac922b7b4ccab479ce64dcd" args="(ReusableObject *object)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ReusableAllocator::release </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00113.html">ReusableObject</a> *&#160;</td>
          <td class="paramname"><em>object</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Release resuable object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>being released. </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="a00200_source.html">thread.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00112.html">ReusableAllocator</a>      </li>
      <li class="footer">Generated on Wed Apr 13 2011 22:39:48 for ucommon by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>