blob: 52d0bc638c367e8d5c5193ae0e8adcb082d4645c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title> TemplateOsclScopedLock&lt; LockClass &gt; class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<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>
<hr><h1>OsclScopedLock&lt; LockClass &gt; Class Template Reference<br>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</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.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a>&gt;</code>
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<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>
<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>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classOsclScopedLock.html#a1">~OsclScopedLock</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Destructor.</em> <a href="#a1"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class LockClass&gt;<br>
class OsclScopedLock&lt; LockClass &gt;</h3>
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.
<p>
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.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="OsclScopedLock::OsclScopedLock"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockClass&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> OsclScopedLock&lt; LockClass &gt;::OsclScopedLock </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">LockClass &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>inLock</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, explicit]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Default constructor Initializes the pointer and takes ownership.
<p>
</td>
</tr>
</table>
<a name="a1" doxytag="OsclScopedLock::~OsclScopedLock"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class LockClass&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> OsclScopedLock&lt; LockClass &gt;::~OsclScopedLock </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destructor.
<p>
The pointer is deleted in case this class still has ownership </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="oscl__lock__base_8h-source.html">oscl_lock_base.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>