blob: c49ad39c4f4253a79d1d9a31d2a3c1458bffbde1 [file] [log] [blame]
<!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> TemplateOsclRefCounterMTDA&lt; LockType &gt; class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>OsclRefCounterMTDA&lt; LockType &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</h1><code>#include &lt;<a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a>&gt;</code>
<p>
<p>Inheritance diagram for OsclRefCounterMTDA&lt; LockType &gt;:
<p><center><img src="classOsclRefCounterMTDA.png" usemap="#OsclRefCounterMTDA< LockType >_map" border="0" alt=""></center>
<map name="OsclRefCounterMTDA< LockType >_map">
<area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,217,24">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a0">OsclRefCounterMTDA</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *p, <a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *dealloc)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a1">~OsclRefCounterMTDA</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a2">addRef</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a3">removeRef</a> ()</td></tr>
<tr><td nowrap align=right valign=top>uint32&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a4">getCount</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class LockType&gt;<br>
class OsclRefCounterMTDA&lt; LockType &gt;</h3>
Implementation of <a class="el" href="classOsclRefCounterDA.html">OsclRefCounterDA</a> for multi-threaded use. A templated lock class must be specified.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="OsclRefCounterMTDA::OsclRefCounterMTDA"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockType&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> OsclRefCounterMTDA&lt; LockType &gt;::OsclRefCounterMTDA </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>p</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>dealloc</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Constructor Takes a pointer to the buffer to track, and a pointer to the deallocator object which will be used to delete the buffer.
<p>
When the reference count reaches zero, the buffer will be deleted by the deallocator. Also, the <a class="el" href="classOsclRefCounter.html">OsclRefCounter</a> object (this) will self-destruct when the reference count is zero. In some cases the <a class="el" href="classOsclRefCounter.html">OsclRefCounter</a> object will be part of the buffer being deleted. For such cases, the object pointer must be equal to the buffer pointer given at construction. If the object is not part of the buffer being deleted, it will self-destruct with a call to delete().<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>p</em>&nbsp;</td><td>
pointer to the buffer to track </td></tr>
<tr><td valign=top><em>dealloc</em>&nbsp;</td><td>
pointer to the deallocator to use when deleting the buffer </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a1" doxytag="OsclRefCounterMTDA::~OsclRefCounterMTDA"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockType&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> virtual OsclRefCounterMTDA&lt; LockType &gt;::~OsclRefCounterMTDA </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destructor empty </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a2" doxytag="OsclRefCounterMTDA::addRef"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockType&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclRefCounterMTDA&lt; LockType &gt;::addRef </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Add to the reference count
<p>
Implements <a class="el" href="classOsclRefCounter.html#a0">OsclRefCounter</a>. </td>
</tr>
</table>
<a name="a4" doxytag="OsclRefCounterMTDA::getCount"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockType&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> uint32 OsclRefCounterMTDA&lt; LockType &gt;::getCount </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the current number of references
<p>
Implements <a class="el" href="classOsclRefCounter.html#a2">OsclRefCounter</a>. </td>
</tr>
</table>
<a name="a3" doxytag="OsclRefCounterMTDA::removeRef"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockType&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void OsclRefCounterMTDA&lt; LockType &gt;::removeRef </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Remove from the reference count
<p>
Implements <a class="el" href="classOsclRefCounter.html#a1">OsclRefCounter</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>