<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Loki: Loki::LockedStorage< T > 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.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.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="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</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"><a class="el" href="a00192.html">Loki</a>::<a class="el" href="a00076.html">LockedStorage</a> </div> </div> <div class="contents"> <h1>Loki::LockedStorage< T > Class Template Reference<br> <small> [<a class="el" href="a00220.html">Storage policies</a>]</small> </h1><!-- doxytag: class="Loki::LockedStorage" --><code>#include <SmartPtr.h></code> <p> <p> <a href="a00408.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="77b3c2a08c0d43a83b447d9c2c34bbb6"></a><!-- doxytag: member="Loki::LockedStorage::InitPointerType" ref="77b3c2a08c0d43a83b447d9c2c34bbb6" args="" --> typedef T * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00076.html#77b3c2a08c0d43a83b447d9c2c34bbb6">InitPointerType</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">the type of the pointee_ object <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="88844c5eb40b576359da4234b76702d8"></a><!-- doxytag: member="Loki::LockedStorage::PointerType" ref="88844c5eb40b576359da4234b76702d8" args="" --> typedef Locker< T > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00076.html#88844c5eb40b576359da4234b76702d8">PointerType</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">type used to declare OwnershipPolicy type. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5ffd134a01c0a2a7b0450f7969c89a2c"></a><!-- doxytag: member="Loki::LockedStorage::ReferenceType" ref="5ffd134a01c0a2a7b0450f7969c89a2c" args="" --> typedef T & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00076.html#5ffd134a01c0a2a7b0450f7969c89a2c">ReferenceType</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">type returned by operator-> <br></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="8a214aaa9bd4d0ed532b9b5a338cb96e"></a><!-- doxytag: member="Loki::LockedStorage::LockedStorage" ref="8a214aaa9bd4d0ed532b9b5a338cb96e" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00076.html#8a214aaa9bd4d0ed532b9b5a338cb96e">LockedStorage</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">type returned by operator* <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class T><br> class Loki::LockedStorage< T ></h3> Implementation of the StoragePolicy used by <a class="el" href="a00132.html">SmartPtr</a>.<p> Each call to operator-> locks the object for the duration of a call to a member function of T.<p> <dl class="user" compact><dt><b>How It Works</b></dt><dd><a class="el" href="a00076.html">LockedStorage</a> has a helper class called Locker, which acts as a smart pointer with limited abilities. LockedStorage::operator-> returns an unnamed temporary of type Locker<T> that exists for the duration of the call to a member function of T. The unnamed temporary locks the object when it is constructed by operator-> and unlocks the object when it is destructed.</dd></dl> <dl class="note" compact><dt><b>Note:</b></dt><dd>This storage policy requires class T to have member functions Lock and Unlock. If your class does not have Lock or Unlock functions, you may either make a child class which does, or make a policy class similar to <a class="el" href="a00076.html">LockedStorage</a> which calls other functions to lock the object. </dd></dl> <hr>The documentation for this class was generated from the following file:<ul> <li>SmartPtr.h</ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 29 18:51:45 2009 for Loki by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>