Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1281

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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>Crystal Space 1.2.1: scfImplementationPooled&lt; Super, Allocator &gt; Class Template Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <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="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <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>
<h1>scfImplementationPooled&lt; Super, Allocator &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__scf.html">Shared Class Facility (SCF)</a>]</small>
</h1><!-- doxytag: class="scfImplementationPooled" -->Derive an SCF implementation from this class to have it pooled.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="pooledscfclass_8h-source.html">csutil/pooledscfclass.h</a>&gt;</code>
<p>

<p>
<a href="classscfImplementationPooled-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f8e3f250c4ceccee5bb4558d469b4dcd"></a><!-- doxytag: member="scfImplementationPooled::scfPooledImplementationType" ref="f8e3f250c4ceccee5bb4558d469b4dcd" args="" -->
typedef <br>
<a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a><br>
&lt; Super, Allocator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#f8e3f250c4ceccee5bb4558d469b4dcd">scfPooledImplementationType</a></td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#58bf853a0e4ae22fb31ae008c7371cdc">DecRef</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classscfImplementationPooled.html#58bf853a0e4ae22fb31ae008c7371cdc" title="DecRef() implementation that returns the object to the pool.">DecRef()</a> implementation that returns the object to the pool.  <a href="#58bf853a0e4ae22fb31ae008c7371cdc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#e623be944186599b97859810957875ce">operator new</a> (size_t n, <a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a> &amp;p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a new instance of a pooled SCF class.  <a href="#e623be944186599b97859810957875ce"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c39508b1a320d8e9265e74deaa65060"></a><!-- doxytag: member="scfImplementationPooled::operator delete" ref="7c39508b1a320d8e9265e74deaa65060" args="(void *instance)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#7c39508b1a320d8e9265e74deaa65060">operator delete</a> (void *instance)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#b09021f169250075d1325a4ad72198a0">operator delete</a> (void *instance, <a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a> &amp;p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Recycle a new instance of a pooled SCF class.  <a href="#b09021f169250075d1325a4ad72198a0"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="027d3ac7a257829b79b7ae656227f52f"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="027d3ac7a257829b79b7ae656227f52f" args="(scfClassType *object, A a, B b, C c, D d, E e)" -->
template&lt;typename A, typename B, typename C, typename D, typename E&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#027d3ac7a257829b79b7ae656227f52f">scfImplementationPooled</a> (scfClassType *object, A a, B b, C c, D d, E e)</td></tr>

<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="731035f6849375b1451d89929e817e3a"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="731035f6849375b1451d89929e817e3a" args="(scfClassType *object, A a, B b, C c, D d)" -->
template&lt;typename A, typename B, typename C, typename D&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#731035f6849375b1451d89929e817e3a">scfImplementationPooled</a> (scfClassType *object, A a, B b, C c, D d)</td></tr>

<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="bde07308998c8b5b6118c1abdb63ecbc"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="bde07308998c8b5b6118c1abdb63ecbc" args="(scfClassType *object, A a, B b, C c)" -->
template&lt;typename A, typename B, typename C&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#bde07308998c8b5b6118c1abdb63ecbc">scfImplementationPooled</a> (scfClassType *object, A a, B b, C c)</td></tr>

<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="b01c35167e6fcc6aebbeaf0444fb2708"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="b01c35167e6fcc6aebbeaf0444fb2708" args="(scfClassType *object, A a, B b)" -->
template&lt;typename A, typename B&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#b01c35167e6fcc6aebbeaf0444fb2708">scfImplementationPooled</a> (scfClassType *object, A a, B b)</td></tr>

<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="fb2d2d5f29e61c6ee0daa6a26c057064"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="fb2d2d5f29e61c6ee0daa6a26c057064" args="(scfClassType *object, A a)" -->
template&lt;typename A&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#fb2d2d5f29e61c6ee0daa6a26c057064">scfImplementationPooled</a> (scfClassType *object, A a)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#d7512ace676f0cce926365b4b6e70d7d">scfImplementationPooled</a> (scfClassType *object)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#d7512ace676f0cce926365b4b6e70d7d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled.html#cc9b2a08ac2864e0ae6eeadc7dc96de8">scfPool</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the pool this instance is from.  <a href="#cc9b2a08ac2864e0ae6eeadc7dc96de8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt;<br>
 class scfImplementationPooled&lt; Super, Allocator &gt;</h3>

Derive an SCF implementation from this class to have it pooled. 
<p>
<ul>
<li>The <em>Super</em> template argument is the <a class="el" href="classscfImplementation.html" title="Baseclass for the SCF implementation templates.">scfImplementation</a>...&lt;&gt; class you would normally use. <div class="fragment"><pre class="fragment"> <span class="keyword">class </span>csFoo : 
   <span class="keyword">public</span> <a class="code" href="classscfImplementationPooled.html" title="Derive an SCF implementation from this class to have it pooled.">scfImplementationPooled</a>&lt;scfImplementation1&lt;csFoo,
                                                     iFoo&gt; &gt;
 {
   ...
 };
</pre></div></li><li>A pooled class must needs to have the scfPooledImplementationType class in its initializer list: <div class="fragment"><pre class="fragment">   csFoo () : <a class="code" href="classscfImplementationPooled.html#f8e3f250c4ceccee5bb4558d469b4dcd">scfPooledImplementationType</a> (this) { ... }
</pre></div></li><li>To obtain an instance of <em>Class</em>, use new with the pool object as the placement argument: <div class="fragment"><pre class="fragment">   csFoo::Pool fooPool;
   ...
   <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;csFoo&gt;</a> foo; foo.<a class="code" href="classcsRef.html#9e60343d6cf44b91d071a61cff000c79" title="Assign an object reference created with the new operator to this smart pointer.">AttachNew</a> (<span class="keyword">new</span> (fooPool) csFoo);
</pre></div> </li></ul>

<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00061">61</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="d7512ace676f0cce926365b4b6e70d7d"></a><!-- doxytag: member="scfImplementationPooled::scfImplementationPooled" ref="d7512ace676f0cce926365b4b6e70d7d" args="(scfClassType *object)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>&lt; Super, Allocator &gt;::<a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>           </td>
          <td>(</td>
          <td class="paramtype">scfClassType *&nbsp;</td>
          <td class="paramname"> <em>object</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
Call from the derived class with 'this' as first argument. 
<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00156">156</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="58bf853a0e4ae22fb31ae008c7371cdc"></a><!-- doxytag: member="scfImplementationPooled::DecRef" ref="58bf853a0e4ae22fb31ae008c7371cdc" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>&lt; Super, Allocator &gt;::DecRef           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classscfImplementationPooled.html#58bf853a0e4ae22fb31ae008c7371cdc" title="DecRef() implementation that returns the object to the pool.">DecRef()</a> implementation that returns the object to the pool. 
<p>

<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00142">142</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="b09021f169250075d1325a4ad72198a0"></a><!-- doxytag: member="scfImplementationPooled::operator delete" ref="b09021f169250075d1325a4ad72198a0" args="(void *instance, Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>&lt; Super, Allocator &gt;::operator delete           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>instance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Recycle a new instance of a pooled SCF class. 
<p>

<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00125">125</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>

<p>Referenced by <a class="el" href="pooledscfclass_8h-source.html#l00133">scfImplementationPooled&lt; scfImplementationExt0&lt; csParasiticDataBufferPooled, csParasiticDataBufferBase &gt; &gt;::operator delete()</a>.</p>

</div>
</div><p>
<a class="anchor" name="e623be944186599b97859810957875ce"></a><!-- doxytag: member="scfImplementationPooled::operator new" ref="e623be944186599b97859810957875ce" args="(size_t n, Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>&lt; Super, Allocator &gt;::operator new           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocate a new instance of a pooled SCF class. 
<p>

<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00100">100</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="cc9b2a08ac2864e0ae6eeadc7dc96de8"></a><!-- doxytag: member="scfImplementationPooled::scfPool" ref="cc9b2a08ac2864e0ae6eeadc7dc96de8" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Super, typename Allocator = CS::Memory::AllocatorMalloc&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classscfImplementationPooled_1_1Pool.html">Pool</a>* <a class="el" href="classscfImplementationPooled.html">scfImplementationPooled</a>&lt; Super, Allocator &gt;::<a class="el" href="classscfImplementationPooled.html#cc9b2a08ac2864e0ae6eeadc7dc96de8">scfPool</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer to the pool this instance is from. 
<p>

<p>Definition at line <a class="el" href="pooledscfclass_8h-source.html#l00097">97</a> of file <a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a>.</p>

<p>Referenced by <a class="el" href="pooledscfclass_8h-source.html#l00133">scfImplementationPooled&lt; scfImplementationExt0&lt; csParasiticDataBufferPooled, csParasiticDataBufferBase &gt; &gt;::operator delete()</a>, and <a class="el" href="pooledscfclass_8h-source.html#l00100">scfImplementationPooled&lt; scfImplementationExt0&lt; csParasiticDataBufferPooled, csParasiticDataBufferBase &gt; &gt;::operator new()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="pooledscfclass_8h-source.html">pooledscfclass.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>