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< LockClass > 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>OsclScopedLock< LockClass > 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 <<a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a>></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> </td><td valign=bottom><a class="el" href="classOsclScopedLock.html#a0">OsclScopedLock</a> (LockClass &inLock)</td></tr> 21 <tr><td> </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> </td><td valign=bottom><a class="el" href="classOsclScopedLock.html#a1">~OsclScopedLock</a> ()</td></tr> 23 <tr><td> </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<class LockClass><br> 27 class OsclScopedLock< LockClass ></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 & 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<class LockClass> </td> 42 </tr> 43 <tr> 44 <td class="md" nowrap valign="top"> OsclScopedLock< LockClass >::OsclScopedLock </td> 45 <td class="md" valign="top">( </td> 46 <td class="md" nowrap valign="top">LockClass & </td> 47 <td class="mdname1" valign="top" nowrap> <em>inLock</em> </td> 48 <td class="md" valign="top">) </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 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<class LockClass> </td> 77 </tr> 78 <tr> 79 <td class="md" nowrap valign="top"> OsclScopedLock< LockClass >::~OsclScopedLock </td> 80 <td class="md" valign="top">( </td> 81 <td class="mdname1" valign="top" nowrap> </td> 82 <td class="md" valign="top">) </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 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