<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>MPQC: sc::ThreadLockHolder Class 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.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</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>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><b>sc</b>::<a class="el" href="classsc_1_1ThreadLockHolder.html">ThreadLockHolder</a> </div> </div> <div class="contents"> <h1>sc::ThreadLockHolder Class Reference</h1><!-- doxytag: class="sc::ThreadLockHolder" -->Acquire a lock on creation and release it on destruction. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="thread_8h_source.html">thread.h</a>></code> <p> <p> <a href="classsc_1_1ThreadLockHolder-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ac98d0251779f9f3a30431782f99610"></a><!-- doxytag: member="sc::ThreadLockHolder::ThreadLockHolder" ref="2ac98d0251779f9f3a30431782f99610" args="(const Ref< ThreadLock > &l)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ThreadLockHolder.html#2ac98d0251779f9f3a30431782f99610">ThreadLockHolder</a> (const <a class="el" href="classsc_1_1Ref.html">Ref</a>< <a class="el" href="classsc_1_1ThreadLock.html">ThreadLock</a> > &l)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Acquires the lock. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ebe3aa72571f037f89c982b04aaca0f"></a><!-- doxytag: member="sc::ThreadLockHolder::unlock" ref="4ebe3aa72571f037f89c982b04aaca0f" args="()" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ThreadLockHolder.html#4ebe3aa72571f037f89c982b04aaca0f">unlock</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Release the lock before the DTOR is called, if it is still held. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a075244b1a74375b153edaa6b9fb34e7"></a><!-- doxytag: member="sc::ThreadLockHolder::lock" ref="a075244b1a74375b153edaa6b9fb34e7" args="()" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ThreadLockHolder.html#a075244b1a74375b153edaa6b9fb34e7">lock</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Acquire the lock once more. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6f9fd8f6241c34b387bc6973487f2aed"></a><!-- doxytag: member="sc::ThreadLockHolder::~ThreadLockHolder" ref="6f9fd8f6241c34b387bc6973487f2aed" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsc_1_1ThreadLockHolder.html#6f9fd8f6241c34b387bc6973487f2aed">~ThreadLockHolder</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Releases the lock if it is still held. <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Acquire a lock on creation and release it on destruction. <p> This should be used to lock and unlock <a class="el" href="classsc_1_1ThreadLock.html" title="The ThreadLock abstract class provides mutex locks to be used in conjunction with...">ThreadLock</a> objects to provide exception safety. <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="thread_8h_source.html">thread.h</a></ul> </div> <hr> <address> <small> Generated at Wed Oct 14 14:12:16 2009 for <a href="http://www.mpqc.org">MPQC</a> 2.3.1 using the documentation package <a href="http://www.doxygen.org">Doxygen</a> 1.5.9. </small> </address> </body> </html>