• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title> TemplateOsclRefCounterMTSA&lt; DeallocType, LockType &gt; class Reference</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5</head><body>
6<!-- Generated by Doxygen 1.2.18 -->
7<center>
8<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>
9<hr><h1>OsclRefCounterMTSA&lt; DeallocType, LockType &gt; Class Template Reference<br>
10<small>
11[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
12</h1><code>#include &lt;<a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a>&gt;</code>
13<p>
14<p>Inheritance diagram for OsclRefCounterMTSA&lt; DeallocType, LockType &gt;:
15<p><center><img src="classOsclRefCounterMTSA.png" usemap="#OsclRefCounterMTSA< DeallocType, LockType >_map" border="0" alt=""></center>
16<map name="OsclRefCounterMTSA< DeallocType, LockType >_map">
17<area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,296,24">
18</map>
19<table border=0 cellpadding=0 cellspacing=0>
20<tr><td></td></tr>
21<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
22<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a0">OsclRefCounterMTSA</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *p)</td></tr>
23<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a1">~OsclRefCounterMTSA</a> ()</td></tr>
24<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a2">addRef</a> ()</td></tr>
25<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a3">removeRef</a> ()</td></tr>
26<tr><td nowrap align=right valign=top>uint32&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterMTSA.html#a4">getCount</a> ()</td></tr>
27</table>
28<hr><a name="_details"></a><h2>Detailed Description</h2>
29<h3>template&lt;class DeallocType, class LockType&gt;<br>
30 class OsclRefCounterMTSA&lt; DeallocType, LockType &gt;</h3>
31
32Implementation of <a class="el" href="classOsclRefCounterSA.html">OsclRefCounterSA</a> for multi-threaded use. A templated lock class must be specified.
33<p>
34<hr><h2>Constructor &amp; Destructor Documentation</h2>
35<a name="a0" doxytag="OsclRefCounterMTSA::OsclRefCounterMTSA"></a><p>
36<table width="100%" cellpadding="2" cellspacing="0" border="0">
37  <tr>
38    <td class="md">
39      <table cellpadding="0" cellspacing="0" border="0">
40        <tr>
41          <td class="md" colspan="4">
42template&lt;class DeallocType, class LockType&gt; </td>
43        </tr>
44        <tr>
45          <td class="md" nowrap valign="top"> OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::OsclRefCounterMTSA </td>
46          <td class="md" valign="top">(&nbsp;</td>
47          <td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
48          <td class="mdname1" valign="top" nowrap>&nbsp; <em>p</em>          </td>
49          <td class="md" valign="top">)&nbsp;</td>
50          <td class="md" nowrap><code> [inline]</code></td>
51        </tr>
52
53      </table>
54    </td>
55  </tr>
56</table>
57<table cellspacing=5 cellpadding=0 border=0>
58  <tr>
59    <td>
60      &nbsp;
61    </td>
62    <td>
63
64<p>
65Constructor Takes a pointer to the buffer to track.
66<p>
67When 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>
68<table border=0 cellspacing=2 cellpadding=0>
69<tr><td valign=top><em>p</em>&nbsp;</td><td>
70pointer to the buffer to track </td></tr>
71</table>
72</dl>    </td>
73  </tr>
74</table>
75<a name="a1" doxytag="OsclRefCounterMTSA::~OsclRefCounterMTSA"></a><p>
76<table width="100%" cellpadding="2" cellspacing="0" border="0">
77  <tr>
78    <td class="md">
79      <table cellpadding="0" cellspacing="0" border="0">
80        <tr>
81          <td class="md" colspan="4">
82template&lt;class DeallocType, class LockType&gt; </td>
83        </tr>
84        <tr>
85          <td class="md" nowrap valign="top"> virtual OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::~OsclRefCounterMTSA </td>
86          <td class="md" valign="top">(&nbsp;</td>
87          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
88          <td class="md" valign="top">)&nbsp;</td>
89          <td class="md" nowrap><code> [inline, virtual]</code></td>
90        </tr>
91
92      </table>
93    </td>
94  </tr>
95</table>
96<table cellspacing=5 cellpadding=0 border=0>
97  <tr>
98    <td>
99      &nbsp;
100    </td>
101    <td>
102
103<p>
104Destructor empty     </td>
105  </tr>
106</table>
107<hr><h2>Member Function Documentation</h2>
108<a name="a2" doxytag="OsclRefCounterMTSA::addRef"></a><p>
109<table width="100%" cellpadding="2" cellspacing="0" border="0">
110  <tr>
111    <td class="md">
112      <table cellpadding="0" cellspacing="0" border="0">
113        <tr>
114          <td class="md" colspan="4">
115template&lt;class DeallocType, class LockType&gt; </td>
116        </tr>
117        <tr>
118          <td class="md" nowrap valign="top"> void OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::addRef </td>
119          <td class="md" valign="top">(&nbsp;</td>
120          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
121          <td class="md" valign="top">)&nbsp;</td>
122          <td class="md" nowrap><code> [inline, virtual]</code></td>
123        </tr>
124
125      </table>
126    </td>
127  </tr>
128</table>
129<table cellspacing=5 cellpadding=0 border=0>
130  <tr>
131    <td>
132      &nbsp;
133    </td>
134    <td>
135
136<p>
137Add to the reference count
138<p>
139Implements <a class="el" href="classOsclRefCounter.html#a0">OsclRefCounter</a>.    </td>
140  </tr>
141</table>
142<a name="a4" doxytag="OsclRefCounterMTSA::getCount"></a><p>
143<table width="100%" cellpadding="2" cellspacing="0" border="0">
144  <tr>
145    <td class="md">
146      <table cellpadding="0" cellspacing="0" border="0">
147        <tr>
148          <td class="md" colspan="4">
149template&lt;class DeallocType, class LockType&gt; </td>
150        </tr>
151        <tr>
152          <td class="md" nowrap valign="top"> uint32 OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::getCount </td>
153          <td class="md" valign="top">(&nbsp;</td>
154          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
155          <td class="md" valign="top">)&nbsp;</td>
156          <td class="md" nowrap><code> [inline, virtual]</code></td>
157        </tr>
158
159      </table>
160    </td>
161  </tr>
162</table>
163<table cellspacing=5 cellpadding=0 border=0>
164  <tr>
165    <td>
166      &nbsp;
167    </td>
168    <td>
169
170<p>
171Gets the current number of references
172<p>
173Implements <a class="el" href="classOsclRefCounter.html#a2">OsclRefCounter</a>.    </td>
174  </tr>
175</table>
176<a name="a3" doxytag="OsclRefCounterMTSA::removeRef"></a><p>
177<table width="100%" cellpadding="2" cellspacing="0" border="0">
178  <tr>
179    <td class="md">
180      <table cellpadding="0" cellspacing="0" border="0">
181        <tr>
182          <td class="md" colspan="4">
183template&lt;class DeallocType, class LockType&gt; </td>
184        </tr>
185        <tr>
186          <td class="md" nowrap valign="top"> void OsclRefCounterMTSA&lt; DeallocType, LockType &gt;::removeRef </td>
187          <td class="md" valign="top">(&nbsp;</td>
188          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
189          <td class="md" valign="top">)&nbsp;</td>
190          <td class="md" nowrap><code> [inline, virtual]</code></td>
191        </tr>
192
193      </table>
194    </td>
195  </tr>
196</table>
197<table cellspacing=5 cellpadding=0 border=0>
198  <tr>
199    <td>
200      &nbsp;
201    </td>
202    <td>
203
204<p>
205Remove from the reference count
206<p>
207Implements <a class="el" href="classOsclRefCounter.html#a1">OsclRefCounter</a>.    </td>
208  </tr>
209</table>
210<hr>The documentation for this class was generated from the following file:<ul>
211<li><a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a></ul>
212<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
213<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
214</small></address>
215</body>
216</html>
217