aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/classOsclScopedLock.html
blob: aac7ac84a90c0831c547398c94a95d7e7ebe6670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: OsclScopedLock&lt; LockClass &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>OsclScopedLock&lt; LockClass &gt; Class Template Reference<br/>
<small>
[<a class="el" href="group__osclbase.html">OSCL Base</a>]</small>
</h1><!-- doxytag: class="OsclScopedLock" -->
<p>The <a class="el" href="classOsclScopedLock.html" title="The OsclScopedLock class is a template class that handles unlocking an abstract class...">OsclScopedLock</a> 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 <a class="el" href="classOsclScopedLock.html" title="The OsclScopedLock class is a template class that handles unlocking an abstract class...">OsclScopedLock</a> goes out of scope.  
<a href="#_details">More...</a></p>

<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 colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclScopedLock.html#ae6923afbc91e9f94f24de70190f0b266">OsclScopedLock</a> (LockClass &amp;inLock)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor Initializes the pointer and takes ownership.  <a href="#ae6923afbc91e9f94f24de70190f0b266"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOsclScopedLock.html#afe0f3002ec115b0fb257a85180c63834">~OsclScopedLock</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#afe0f3002ec115b0fb257a85180c63834"></a><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>

<p>The <a class="el" href="classOsclScopedLock.html" title="The OsclScopedLock class is a template class that handles unlocking an abstract class...">OsclScopedLock</a> 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 <a class="el" href="classOsclScopedLock.html" title="The OsclScopedLock class is a template class that handles unlocking an abstract class...">OsclScopedLock</a> goes out of scope. </p>
<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 class="anchor" id="ae6923afbc91e9f94f24de70190f0b266"></a><!-- doxytag: member="OsclScopedLock::OsclScopedLock" ref="ae6923afbc91e9f94f24de70190f0b266" args="(LockClass &amp;inLock)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockClass &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOsclScopedLock.html">OsclScopedLock</a>&lt; LockClass &gt;::<a class="el" href="classOsclScopedLock.html">OsclScopedLock</a> </td>
          <td>(</td>
          <td class="paramtype">LockClass &amp;&nbsp;</td>
          <td class="paramname"> <em>inLock</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor Initializes the pointer and takes ownership. </p>

</div>
</div>
<a class="anchor" id="afe0f3002ec115b0fb257a85180c63834"></a><!-- doxytag: member="OsclScopedLock::~OsclScopedLock" ref="afe0f3002ec115b0fb257a85180c63834" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LockClass &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOsclScopedLock.html">OsclScopedLock</a>&lt; LockClass &gt;::~<a class="el" href="classOsclScopedLock.html">OsclScopedLock</a> </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<p>The pointer is deleted in case this class still has ownership </p>

</div>
</div>
<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></li>
</ul>
</div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.002.1.1 </small>
</small></address>
</body>
</html>