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> TemplateOsclRefCounterMTDA< LockType > 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> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>OsclRefCounterMTDA< LockType > Class Template Reference<br> 10 <small> 11 [<a class="el" href="group__osclbase.html">OSCL Base</a>]</small> 12 </h1><code>#include <<a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a>></code> 13 <p> 14 <p>Inheritance diagram for OsclRefCounterMTDA< LockType >: 15 <p><center><img src="classOsclRefCounterMTDA.png" usemap="#OsclRefCounterMTDA< LockType >_map" border="0" alt=""></center> 16 <map name="OsclRefCounterMTDA< LockType >_map"> 17 <area href="classOsclRefCounter.html" alt="OsclRefCounter" shape="rect" coords="0,0,217,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> </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> 23 <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a1">~OsclRefCounterMTDA</a> ()</td></tr> 24 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a2">addRef</a> ()</td></tr> 25 <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a3">removeRef</a> ()</td></tr> 26 <tr><td nowrap align=right valign=top>uint32 </td><td valign=bottom><a class="el" href="classOsclRefCounterMTDA.html#a4">getCount</a> ()</td></tr> 27 </table> 28 <hr><a name="_details"></a><h2>Detailed Description</h2> 29 <h3>template<class LockType><br> 30 class OsclRefCounterMTDA< LockType ></h3> 31 32 Implementation of <a class="el" href="classOsclRefCounterDA.html">OsclRefCounterDA</a> for multi-threaded use. A templated lock class must be specified. 33 <p> 34 <hr><h2>Constructor & Destructor Documentation</h2> 35 <a name="a0" doxytag="OsclRefCounterMTDA::OsclRefCounterMTDA"></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"> 42 template<class LockType> </td> 43 </tr> 44 <tr> 45 <td class="md" nowrap valign="top"> OsclRefCounterMTDA< LockType >::OsclRefCounterMTDA </td> 46 <td class="md" valign="top">( </td> 47 <td class="md" nowrap valign="top"><a class="el" href="group__osclbase.html#a25">OsclAny</a> * </td> 48 <td class="mdname" nowrap> <em>p</em>, </td> 49 </tr> 50 <tr> 51 <td></td> 52 <td></td> 53 <td class="md" nowrap><a class="el" href="classOsclDestructDealloc.html">OsclDestructDealloc</a> * </td> 54 <td class="mdname" nowrap> <em>dealloc</em></td> 55 </tr> 56 <tr> 57 <td></td> 58 <td class="md">) </td> 59 <td class="md" colspan="2"><code> [inline]</code></td> 60 </tr> 61 62 </table> 63 </td> 64 </tr> 65 </table> 66 <table cellspacing=5 cellpadding=0 border=0> 67 <tr> 68 <td> 69 70 </td> 71 <td> 72 73 <p> 74 Constructor Takes a pointer to the buffer to track, and a pointer to the deallocator object which will be used to delete the buffer. 75 <p> 76 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> 77 <table border=0 cellspacing=2 cellpadding=0> 78 <tr><td valign=top><em>p</em> </td><td> 79 pointer to the buffer to track </td></tr> 80 <tr><td valign=top><em>dealloc</em> </td><td> 81 pointer to the deallocator to use when deleting the buffer </td></tr> 82 </table> 83 </dl> </td> 84 </tr> 85 </table> 86 <a name="a1" doxytag="OsclRefCounterMTDA::~OsclRefCounterMTDA"></a><p> 87 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 88 <tr> 89 <td class="md"> 90 <table cellpadding="0" cellspacing="0" border="0"> 91 <tr> 92 <td class="md" colspan="4"> 93 template<class LockType> </td> 94 </tr> 95 <tr> 96 <td class="md" nowrap valign="top"> virtual OsclRefCounterMTDA< LockType >::~OsclRefCounterMTDA </td> 97 <td class="md" valign="top">( </td> 98 <td class="mdname1" valign="top" nowrap> </td> 99 <td class="md" valign="top">) </td> 100 <td class="md" nowrap><code> [inline, virtual]</code></td> 101 </tr> 102 103 </table> 104 </td> 105 </tr> 106 </table> 107 <table cellspacing=5 cellpadding=0 border=0> 108 <tr> 109 <td> 110 111 </td> 112 <td> 113 114 <p> 115 Destructor empty </td> 116 </tr> 117 </table> 118 <hr><h2>Member Function Documentation</h2> 119 <a name="a2" doxytag="OsclRefCounterMTDA::addRef"></a><p> 120 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 121 <tr> 122 <td class="md"> 123 <table cellpadding="0" cellspacing="0" border="0"> 124 <tr> 125 <td class="md" colspan="4"> 126 template<class LockType> </td> 127 </tr> 128 <tr> 129 <td class="md" nowrap valign="top"> void OsclRefCounterMTDA< LockType >::addRef </td> 130 <td class="md" valign="top">( </td> 131 <td class="mdname1" valign="top" nowrap> </td> 132 <td class="md" valign="top">) </td> 133 <td class="md" nowrap><code> [inline, virtual]</code></td> 134 </tr> 135 136 </table> 137 </td> 138 </tr> 139 </table> 140 <table cellspacing=5 cellpadding=0 border=0> 141 <tr> 142 <td> 143 144 </td> 145 <td> 146 147 <p> 148 Add to the reference count 149 <p> 150 Implements <a class="el" href="classOsclRefCounter.html#a0">OsclRefCounter</a>. </td> 151 </tr> 152 </table> 153 <a name="a4" doxytag="OsclRefCounterMTDA::getCount"></a><p> 154 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 155 <tr> 156 <td class="md"> 157 <table cellpadding="0" cellspacing="0" border="0"> 158 <tr> 159 <td class="md" colspan="4"> 160 template<class LockType> </td> 161 </tr> 162 <tr> 163 <td class="md" nowrap valign="top"> uint32 OsclRefCounterMTDA< LockType >::getCount </td> 164 <td class="md" valign="top">( </td> 165 <td class="mdname1" valign="top" nowrap> </td> 166 <td class="md" valign="top">) </td> 167 <td class="md" nowrap><code> [inline, virtual]</code></td> 168 </tr> 169 170 </table> 171 </td> 172 </tr> 173 </table> 174 <table cellspacing=5 cellpadding=0 border=0> 175 <tr> 176 <td> 177 178 </td> 179 <td> 180 181 <p> 182 Gets the current number of references 183 <p> 184 Implements <a class="el" href="classOsclRefCounter.html#a2">OsclRefCounter</a>. </td> 185 </tr> 186 </table> 187 <a name="a3" doxytag="OsclRefCounterMTDA::removeRef"></a><p> 188 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 189 <tr> 190 <td class="md"> 191 <table cellpadding="0" cellspacing="0" border="0"> 192 <tr> 193 <td class="md" colspan="4"> 194 template<class LockType> </td> 195 </tr> 196 <tr> 197 <td class="md" nowrap valign="top"> void OsclRefCounterMTDA< LockType >::removeRef </td> 198 <td class="md" valign="top">( </td> 199 <td class="mdname1" valign="top" nowrap> </td> 200 <td class="md" valign="top">) </td> 201 <td class="md" nowrap><code> [inline, virtual]</code></td> 202 </tr> 203 204 </table> 205 </td> 206 </tr> 207 </table> 208 <table cellspacing=5 cellpadding=0 border=0> 209 <tr> 210 <td> 211 212 </td> 213 <td> 214 215 <p> 216 Remove from the reference count 217 <p> 218 Implements <a class="el" href="classOsclRefCounter.html#a1">OsclRefCounter</a>. </td> 219 </tr> 220 </table> 221 <hr>The documentation for this class was generated from the following file:<ul> 222 <li><a class="el" href="oscl__refcounter_8h-source.html">oscl_refcounter.h</a></ul> 223 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 224 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 225 </small></address> 226 </body> 227 </html> 228