• 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>OsclRefCounterDA 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>OsclRefCounterDA Class 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 OsclRefCounterDA:
15<p><center><img src="classOsclRefCounterDA.png" usemap="#OsclRefCounterDA_map" border="0" alt=""></center>
16<map name="OsclRefCounterDA_map">
17<area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,120,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="classOsclRefCounterDA.html#a0">OsclRefCounterDA</a> (<a class="el" href="group__osclbase.html#a25">OsclAny</a> *p, <a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *dealloc)</td></tr>
23<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterDA.html#a1">~OsclRefCounterDA</a> ()</td></tr>
24<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterDA.html#a2">addRef</a> ()</td></tr>
25<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterDA.html#a3">removeRef</a> ()</td></tr>
26<tr><td nowrap align=right valign=top>uint32&nbsp;</td><td valign=bottom><a class="el" href="classOsclRefCounterDA.html#a4">getCount</a> ()</td></tr>
27</table>
28<hr><a name="_details"></a><h2>Detailed Description</h2>
29Implementation of an <a class="el" href="classOsclRefCounter.html">OsclRefCounter</a> that uses a dynamically created deallocator.
30<p>
31<hr><h2>Constructor &amp; Destructor Documentation</h2>
32<a name="a0" doxytag="OsclRefCounterDA::OsclRefCounterDA"></a><p>
33<table width="100%" cellpadding="2" cellspacing="0" border="0">
34  <tr>
35    <td class="md">
36      <table cellpadding="0" cellspacing="0" border="0">
37        <tr>
38          <td class="md" nowrap valign="top"> OsclRefCounterDA::OsclRefCounterDA </td>
39          <td class="md" valign="top">(&nbsp;</td>
40          <td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> *&nbsp;</td>
41          <td class="mdname" nowrap>&nbsp; <em>p</em>, </td>
42        </tr>
43        <tr>
44          <td></td>
45          <td></td>
46          <td class="md" nowrap><a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> *&nbsp;</td>
47          <td class="mdname" nowrap>&nbsp; <em>dealloc</em></td>
48        </tr>
49        <tr>
50          <td></td>
51          <td class="md">)&nbsp;</td>
52          <td class="md" colspan="2"><code> [inline]</code></td>
53        </tr>
54
55      </table>
56    </td>
57  </tr>
58</table>
59<table cellspacing=5 cellpadding=0 border=0>
60  <tr>
61    <td>
62      &nbsp;
63    </td>
64    <td>
65
66<p>
67Constructor Takes a pointer to the buffer to track, and a pointer to the deallocator object which will be used to delete the buffer.
68<p>
69When 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>
70<table border=0 cellspacing=2 cellpadding=0>
71<tr><td valign=top><em>p</em>&nbsp;</td><td>
72pointer to the buffer to track </td></tr>
73<tr><td valign=top><em>dealloc</em>&nbsp;</td><td>
74pointer to the deallocator to use when deleting the buffer </td></tr>
75</table>
76</dl>    </td>
77  </tr>
78</table>
79<a name="a1" doxytag="OsclRefCounterDA::~OsclRefCounterDA"></a><p>
80<table width="100%" cellpadding="2" cellspacing="0" border="0">
81  <tr>
82    <td class="md">
83      <table cellpadding="0" cellspacing="0" border="0">
84        <tr>
85          <td class="md" nowrap valign="top"> virtual OsclRefCounterDA::~OsclRefCounterDA </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="OsclRefCounterDA::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" nowrap valign="top"> void OsclRefCounterDA::addRef </td>
115          <td class="md" valign="top">(&nbsp;</td>
116          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
117          <td class="md" valign="top">)&nbsp;</td>
118          <td class="md" nowrap><code> [inline, virtual]</code></td>
119        </tr>
120
121      </table>
122    </td>
123  </tr>
124</table>
125<table cellspacing=5 cellpadding=0 border=0>
126  <tr>
127    <td>
128      &nbsp;
129    </td>
130    <td>
131
132<p>
133Add to the reference count
134<p>
135Implements <a class="el" href="classOsclRefCounter.html#a0">OsclRefCounter</a>.    </td>
136  </tr>
137</table>
138<a name="a4" doxytag="OsclRefCounterDA::getCount"></a><p>
139<table width="100%" cellpadding="2" cellspacing="0" border="0">
140  <tr>
141    <td class="md">
142      <table cellpadding="0" cellspacing="0" border="0">
143        <tr>
144          <td class="md" nowrap valign="top"> uint32 OsclRefCounterDA::getCount </td>
145          <td class="md" valign="top">(&nbsp;</td>
146          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
147          <td class="md" valign="top">)&nbsp;</td>
148          <td class="md" nowrap><code> [inline, virtual]</code></td>
149        </tr>
150
151      </table>
152    </td>
153  </tr>
154</table>
155<table cellspacing=5 cellpadding=0 border=0>
156  <tr>
157    <td>
158      &nbsp;
159    </td>
160    <td>
161
162<p>
163Gets the current number of references
164<p>
165Implements <a class="el" href="classOsclRefCounter.html#a2">OsclRefCounter</a>.    </td>
166  </tr>
167</table>
168<a name="a3" doxytag="OsclRefCounterDA::removeRef"></a><p>
169<table width="100%" cellpadding="2" cellspacing="0" border="0">
170  <tr>
171    <td class="md">
172      <table cellpadding="0" cellspacing="0" border="0">
173        <tr>
174          <td class="md" nowrap valign="top"> void OsclRefCounterDA::removeRef </td>
175          <td class="md" valign="top">(&nbsp;</td>
176          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
177          <td class="md" valign="top">)&nbsp;</td>
178          <td class="md" nowrap><code> [inline, virtual]</code></td>
179        </tr>
180
181      </table>
182    </td>
183  </tr>
184</table>
185<table cellspacing=5 cellpadding=0 border=0>
186  <tr>
187    <td>
188      &nbsp;
189    </td>
190    <td>
191
192<p>
193Remove from the reference count
194<p>
195Implements <a class="el" href="classOsclRefCounter.html#a1">OsclRefCounter</a>.    </td>
196  </tr>
197</table>
198<hr>The documentation for this class was generated from the following file:<ul>
199<li><a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a></ul>
200<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
201<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
202</small></address>
203</body>
204</html>
205