aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/classOsclRefCounterMTDA.html
blob: 6ac44e26fd69a6be06b54dbd7a7eaa40d855fed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!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>oscl: OsclRefCounterMTDA&lt; LockType &gt; Class Template 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.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>OsclRefCounterMTDA&lt; LockType &gt; Class Template Reference<br/>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</h1><!-- doxytag: class="OsclRefCounterMTDA" --><!-- doxytag: inherits="OsclRefCounter" -->
<p><code>#include &lt;<a class="el" href="oscl__refcounter_8h_source.html">oscl_refcounter.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for OsclRefCounterMTDA&lt; LockType &gt;:</div>
<div class="dynsection">
 <div class="center">
  <img src="classOsclRefCounterMTDA.png" usemap="#OsclRefCounterMTDA&lt; LockType &gt;_map" alt=""/>
  <map id="OsclRefCounterMTDA&lt; LockType &gt;_map" name="OsclRefCounterMTDA&lt; LockType &gt;_map">
<area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,217,24"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclRefCounterMTDA.html#a79b9e26eaf436127de81289f83fc41dc">OsclRefCounterMTDA</a> (<a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *p, <a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *dealloc)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclRefCounterMTDA.html#aedb97c08db63effb3e27d47d83a7f2c6">~OsclRefCounterMTDA</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclRefCounterMTDA.html#a4f4bde5095f2d950ae88df3957a8f1f9">addRef</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclRefCounterMTDA.html#a09931f739648a13952cc8da43e8cfd53">removeRef</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclRefCounterMTDA.html#aeec2f9ae8c94ff951c2cb395c4dc6f03">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>

<p>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 class="anchor" id="a79b9e26eaf436127de81289f83fc41dc"></a><!-- doxytag: member="OsclRefCounterMTDA::OsclRefCounterMTDA" ref="a79b9e26eaf436127de81289f83fc41dc" args="(OsclAny *p, OsclDestructDealloc *dealloc)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a>&lt; LockType &gt;::<a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__osclbase.html#ga3bac54662348f5e6c08b97ca97066b89">OsclAny</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *&nbsp;</td>
          <td class="paramname"> <em>dealloc</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<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>
<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().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>pointer to the buffer to track </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dealloc</em>&nbsp;</td><td>pointer to the deallocator to use when deleting the buffer </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="oscl__base__macros_8h_source.html#l00042">NULL</a>, and <a class="el" href="oscl__assert_8h_source.html#l00041">OSCL_ASSERT</a>.</p>

</div>
</div>
<a class="anchor" id="aedb97c08db63effb3e27d47d83a7f2c6"></a><!-- doxytag: member="OsclRefCounterMTDA::~OsclRefCounterMTDA" ref="aedb97c08db63effb3e27d47d83a7f2c6" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a>&lt; LockType &gt;::~<a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a> </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor empty </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4f4bde5095f2d950ae88df3957a8f1f9"></a><!-- doxytag: member="OsclRefCounterMTDA::addRef" ref="a4f4bde5095f2d950ae88df3957a8f1f9" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a>&lt; LockType &gt;::addRef </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add to the reference count </p>

<p>Implements <a class="el" href="classOsclRefCounter.html#a36656788a3ab2b554bc7e917bf6a4adb">OsclRefCounter</a>.</p>

</div>
</div>
<a class="anchor" id="aeec2f9ae8c94ff951c2cb395c4dc6f03"></a><!-- doxytag: member="OsclRefCounterMTDA::getCount" ref="aeec2f9ae8c94ff951c2cb395c4dc6f03" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">uint32 <a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a>&lt; LockType &gt;::getCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the current number of references </p>

<p>Implements <a class="el" href="classOsclRefCounter.html#a647a4b140b695ad7f8e68e41cb3cc137">OsclRefCounter</a>.</p>

</div>
</div>
<a class="anchor" id="a09931f739648a13952cc8da43e8cfd53"></a><!-- doxytag: member="OsclRefCounterMTDA::removeRef" ref="a09931f739648a13952cc8da43e8cfd53" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classOsclRefCounterMTDA.html">OsclRefCounterMTDA</a>&lt; LockType &gt;::removeRef </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Remove from the reference count </p>

<p>Implements <a class="el" href="classOsclRefCounter.html#aa7b138fd57f149a575356e51ee2d4451">OsclRefCounter</a>.</p>

<p>References <a class="el" href="classOsclDestructDealloc.html#ad7ceb70eb3012d71a588854d36ddedef">OsclDestructDealloc::destruct_and_dealloc()</a>.</p>

</div>
</div>
<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></li>
</ul>
</div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.002.1.1 </small>
</small></address>
</body>
</html>