<!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>Crystal Space 1.2.1: csScopedMutexLock Class Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <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> <h1>csScopedMutexLock Class Reference</h1><!-- doxytag: class="csScopedMutexLock" -->This is a utility class for locking a Mutex. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="scopedmutexlock_8h-source.html">csutil/scopedmutexlock.h</a>></code> <p> <p> <a href="classcsScopedMutexLock-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="f27c7c4313d4fb14a906187fed4eae93"></a><!-- doxytag: member="csScopedMutexLock::csScopedMutexLock" ref="f27c7c4313d4fb14a906187fed4eae93" args="(csMutex *newmutex)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsScopedMutexLock.html#f27c7c4313d4fb14a906187fed4eae93">csScopedMutexLock</a> (<a class="el" href="classcsMutex.html">csMutex</a> *newmutex)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3f8d24440daef71d3a9769b282d5161"></a><!-- doxytag: member="csScopedMutexLock::~csScopedMutexLock" ref="f3f8d24440daef71d3a9769b282d5161" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsScopedMutexLock.html#f3f8d24440daef71d3a9769b282d5161">~csScopedMutexLock</a> ()</td></tr> <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06ed0fd837c43217b9c1d4d008db672b"></a><!-- doxytag: member="csScopedMutexLock::mutex" ref="06ed0fd837c43217b9c1d4d008db672b" args="" --> <a class="el" href="classcsMutex.html">csMutex</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsScopedMutexLock.html#06ed0fd837c43217b9c1d4d008db672b">mutex</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This is a utility class for locking a Mutex. <p> If A MutexLock class is created it locks the mutex, when it is destroyed it unlocks the Mutex again. So locking a mutex can happen by creating a MutexLock object on the stack. The compiler will then take care that the Unlock calls will be done in each case. <div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> Myfunc() { <a class="code" href="classcsScopedMutexLock.html" title="This is a utility class for locking a Mutex.">csScopedMutexLock</a> lock(mymutex); <span class="keywordflow">do</span> something special <span class="keywordflow">return</span>; } </pre></div> <p>Definition at line <a class="el" href="scopedmutexlock_8h-source.html#l00046">46</a> of file <a class="el" href="scopedmutexlock_8h-source.html">scopedmutexlock.h</a>.</p> <hr>The documentation for this class was generated from the following file:<ul> <li>csutil/<a class="el" href="scopedmutexlock_8h-source.html">scopedmutexlock.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>