Home | History | Annotate | Download | only in oscl_html
      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> TemplateOsclScopedLock&lt; LockClass &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>OsclScopedLock&lt; LockClass &gt; Class Template Reference<br>
     10 <small>
     11 [<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
     12 </h1>The OsclScopedLock class is a template class that handles unlocking an abstract class on destruction. This is very useful for ensuring that the lock is released when the OsclScopedLock goes out of scope. 
     13 <a href="#_details">More...</a>
     14 <p>
     15 <code>#include &lt;<a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a>&gt;</code>
     16 <p>
     17 <table border=0 cellpadding=0 cellspacing=0>
     18 <tr><td></td></tr>
     19 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
     20 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclScopedLock.html#a0">OsclScopedLock</a> (LockClass &amp;inLock)</td></tr>
     21 <tr><td>&nbsp;</td><td><font size=-1><em>Default constructor Initializes the pointer and takes ownership.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
     22 <tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclScopedLock.html#a1">~OsclScopedLock</a> ()</td></tr>
     23 <tr><td>&nbsp;</td><td><font size=-1><em>Destructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
     24 </table>
     25 <hr><a name="_details"></a><h2>Detailed Description</h2>
     26 <h3>template&lt;class LockClass&gt;<br>
     27  class OsclScopedLock&lt; LockClass &gt;</h3>
     28 
     29 The OsclScopedLock class is a template class that handles unlocking an abstract class on destruction. This is very useful for ensuring that the lock is released when the OsclScopedLock goes out of scope.
     30 <p>
     31 The purpose of this class is to provide a way to prevent accidental resource leaks in a class or a method, due to "not remembering to unlock" variables which might lead to deadlock conditions. 
     32 <p>
     33 <hr><h2>Constructor &amp; Destructor Documentation</h2>
     34 <a name="a0" doxytag="OsclScopedLock::OsclScopedLock"></a><p>
     35 <table width="100%" cellpadding="2" cellspacing="0" border="0">
     36   <tr>
     37     <td class="md">
     38       <table cellpadding="0" cellspacing="0" border="0">
     39         <tr>
     40           <td class="md" colspan="4">
     41 template&lt;class LockClass&gt; </td>
     42         </tr>
     43         <tr>
     44           <td class="md" nowrap valign="top"> OsclScopedLock&lt; LockClass &gt;::OsclScopedLock </td>
     45           <td class="md" valign="top">(&nbsp;</td>
     46           <td class="md" nowrap valign="top">LockClass &amp;&nbsp;</td>
     47           <td class="mdname1" valign="top" nowrap>&nbsp; <em>inLock</em>          </td>
     48           <td class="md" valign="top">)&nbsp;</td>
     49           <td class="md" nowrap><code> [inline, explicit]</code></td>
     50         </tr>
     51 
     52       </table>
     53     </td>
     54   </tr>
     55 </table>
     56 <table cellspacing=5 cellpadding=0 border=0>
     57   <tr>
     58     <td>
     59       &nbsp;
     60     </td>
     61     <td>
     62 
     63 <p>
     64 Default constructor Initializes the pointer and takes ownership.
     65 <p>
     66     </td>
     67   </tr>
     68 </table>
     69 <a name="a1" doxytag="OsclScopedLock::~OsclScopedLock"></a><p>
     70 <table width="100%" cellpadding="2" cellspacing="0" border="0">
     71   <tr>
     72     <td class="md">
     73       <table cellpadding="0" cellspacing="0" border="0">
     74         <tr>
     75           <td class="md" colspan="4">
     76 template&lt;class LockClass&gt; </td>
     77         </tr>
     78         <tr>
     79           <td class="md" nowrap valign="top"> OsclScopedLock&lt; LockClass &gt;::~OsclScopedLock </td>
     80           <td class="md" valign="top">(&nbsp;</td>
     81           <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
     82           <td class="md" valign="top">)&nbsp;</td>
     83           <td class="md" nowrap><code> [inline]</code></td>
     84         </tr>
     85 
     86       </table>
     87     </td>
     88   </tr>
     89 </table>
     90 <table cellspacing=5 cellpadding=0 border=0>
     91   <tr>
     92     <td>
     93       &nbsp;
     94     </td>
     95     <td>
     96 
     97 <p>
     98 Destructor.
     99 <p>
    100 The pointer is deleted in case this class still has ownership     </td>
    101   </tr>
    102 </table>
    103 <hr>The documentation for this class was generated from the following file:<ul>
    104 <li><a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a></ul>
    105 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
    106 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
    107 </small></address>
    108 </body>
    109 </html>
    110