Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 88959ca903fe50462ea99715ead18944 > files > 138

raul-devel-0.7.0-1.fc14.1.x86_64.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>RAUL: Raul::Maid 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.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><b>Raul</b>      </li>
      <li><a class="el" href="classRaul_1_1Maid.html">Raul::Maid</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Raul::Maid Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Raul::Maid" -->
<p>Explicitly driven garbage collector.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Maid_8hpp_source.html">Maid.hpp</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for Raul::Maid:</div>
<div class="dyncontent">
<div class="center"><img src="classRaul_1_1Maid__coll__graph.png" border="0" usemap="#Raul_1_1Maid_coll__map" alt="Collaboration graph"/></div>
<map name="Raul_1_1Maid_coll__map" id="Raul_1_1Maid_coll__map">
<area shape="rect" id="node2" href="classRaul_1_1List.html" title="Raul::List\&lt; SharedPtr\&lt; Raul::Deletable \&gt; \&gt;" alt="" coords="40,304,314,333"/><area shape="rect" id="node4" href="classRaul_1_1Deletable.html" title="Something with a virtual destructor." alt="" coords="118,5,230,35"/><area shape="rect" id="node8" href="classRaul_1_1List_1_1Node.html" title="A node in a List." alt="" coords="100,101,249,131"/><area shape="rect" id="node14" href="classRaul_1_1SRSWQueue.html" title="Raul::SRSWQueue\&lt; Raul::Deletable * \&gt;" alt="" coords="309,155,568,184"/><area shape="rect" id="node6" href="classRaul_1_1List_1_1const__iterator.html" title="Realtime safe const iterator for a List." alt="" coords="29,208,226,237"/><area shape="rect" id="node11" href="classRaul_1_1List_1_1iterator.html" title="Realtime safe iterator for a List." alt="" coords="250,208,408,237"/></map>
</div>

<p><a href="classRaul_1_1Maid-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58007923cb7842203186adafd9805abb"></a><!-- doxytag: member="Raul::Maid::Maid" ref="a58007923cb7842203186adafd9805abb" args="(size_t size)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>Maid</b> (size_t size)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRaul_1_1Maid.html#a0bbfa3552c0c96792d301267b92e28ce">push</a> (<a class="el" href="classRaul_1_1Deletable.html">Raul::Deletable</a> *obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push a raw pointer to be deleted when <a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae" title="Free all the objects in the queue (passed by push()).">cleanup()</a> is called next.  <a href="#a0bbfa3552c0c96792d301267b92e28ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRaul_1_1Maid.html#a214c353812c45380b27fa3341ff352fa">manage</a> (SharedPtr&lt; <a class="el" href="classRaul_1_1Deletable.html">Raul::Deletable</a> &gt; ptr)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Manage a SharedPtr.  <a href="#a214c353812c45380b27fa3341ff352fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83d64bae9f6838d05e6ae8f9740b4dae"></a><!-- doxytag: member="Raul::Maid::cleanup" ref="a83d64bae9f6838d05e6ae8f9740b4dae" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae">cleanup</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free all the objects in the queue (passed by <a class="el" href="classRaul_1_1Maid.html#a0bbfa3552c0c96792d301267b92e28ce" title="Push a raw pointer to be deleted when cleanup() is called next.">push()</a>). <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Explicitly driven garbage collector. </p>
<p>This is used by realtime threads to allow hard realtime deletion of objects (<a class="el" href="classRaul_1_1Maid.html#a0bbfa3552c0c96792d301267b92e28ce" title="Push a raw pointer to be deleted when cleanup() is called next.">push()</a> is realtime safe).</p>
<p>You can also manage a SharedPtr, so <a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae" title="Free all the objects in the queue (passed by push()).">cleanup()</a> will delete it when all references are dropped (except the one held by the <a class="el" href="classRaul_1_1Maid.html" title="Explicitly driven garbage collector.">Maid</a> itself). This allows using a SharedPtr freely in hard realtime threads without having to worry about deletion accidentally occuring in the realtime thread.</p>
<p><a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae" title="Free all the objects in the queue (passed by push()).">cleanup()</a> should be called periodically to free memory, often enough to prevent the queue from overflowing. This is probably best done by the main thread to avoid the overhead of having a thread just to delete things. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0bbfa3552c0c96792d301267b92e28ce"></a><!-- doxytag: member="Raul::Maid::push" ref="a0bbfa3552c0c96792d301267b92e28ce" args="(Raul::Deletable *obj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Raul::Maid::push </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classRaul_1_1Deletable.html">Raul::Deletable</a> *&nbsp;</td>
          <td class="paramname"> <em>obj</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Push a raw pointer to be deleted when <a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae" title="Free all the objects in the queue (passed by push()).">cleanup()</a> is called next. </p>
<p>Realtime safe. </p>

<p>References <a class="el" href="classRaul_1_1SRSWQueue.html#a5d045a1f3a8e554de0d34b48fd9c7091">Raul::SRSWQueue&lt; T &gt;::push()</a>.</p>

</div>
</div>
<a class="anchor" id="a214c353812c45380b27fa3341ff352fa"></a><!-- doxytag: member="Raul::Maid::manage" ref="a214c353812c45380b27fa3341ff352fa" args="(SharedPtr&lt; Raul::Deletable &gt; ptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Raul::Maid::manage </td>
          <td>(</td>
          <td class="paramtype">SharedPtr&lt; <a class="el" href="classRaul_1_1Deletable.html">Raul::Deletable</a> &gt;&nbsp;</td>
          <td class="paramname"> <em>ptr</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Manage a SharedPtr. </p>
<p>NOT realtime safe.</p>
<p><em>ptr</em> is guaranteed to be deleted in the context that calls <a class="el" href="classRaul_1_1Maid.html#a83d64bae9f6838d05e6ae8f9740b4dae" title="Free all the objects in the queue (passed by push()).">cleanup()</a> </p>

<p>References <a class="el" href="classRaul_1_1List.html#a20d904c950f9eb4208b19e6ebb690371">Raul::List&lt; T &gt;::push_back()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Maid_8hpp_source.html">Maid.hpp</a></li>
<li>Maid.cpp</li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Oct 6 2010 for RAUL by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>