<!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: CS::Utility::ScopedDelete< T > Class Template 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> <div class="nav"> <a class="el" href="namespaceCS.html">CS</a>::<a class="el" href="namespaceCS_1_1Utility.html">Utility</a>::<a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">ScopedDelete</a></div> <h1>CS::Utility::ScopedDelete< T > Class Template Reference</h1><!-- doxytag: class="CS::Utility::ScopedDelete" --><!-- doxytag: inherits="CS::Implementation::NonCopyable_" -->Helper class to <code>delete</code> a pointer when exiting a scope. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="scopeddelete_8h-source.html">csutil/scopeddelete.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for CS::Utility::ScopedDelete< T >:</div> <div class="dynsection"> <p><center><img src="classCS_1_1Utility_1_1ScopedDelete__inherit__graph.png" border="0" usemap="#CS_1_1Utility_1_1ScopedDelete_3_01T_01_4__inherit__map" alt="Inheritance graph"></center> <map name="CS_1_1Utility_1_1ScopedDelete_3_01T_01_4__inherit__map"> <area shape="rect" href="classCS_1_1Implementation_1_1NonCopyable__.html" title="Base-class which ensures that derived classes are not copy-constructible or assignable..." alt="" coords="60,7,169,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classCS_1_1Utility_1_1ScopedDelete-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">T & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html#b9e76603a79234b2bf45174efe1ad8f3">operator *</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Dereference underlying pointer. <a href="#b9e76603a79234b2bf45174efe1ad8f3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html#2b864a9ff832086b51a68c80b44290d8">operator T *</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Cast to a pointer. <a href="#2b864a9ff832086b51a68c80b44290d8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html#2db49edbaa49511724221782fc1b9eb6">operator-></a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Dereference underlying pointer. <a href="#2db49edbaa49511724221782fc1b9eb6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html#927447ba3baf4d6e6cb0573fa502f6b2">ScopedDelete</a> (T *ptr)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct from given pointer. <a href="#927447ba3baf4d6e6cb0573fa502f6b2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html#47788634526c878b5ae7cfb81b244f43">~ScopedDelete</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destruct. Deletes the given pointer! <a href="#47788634526c878b5ae7cfb81b244f43"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class T><br> class CS::Utility::ScopedDelete< T ></h3> Helper class to <code>delete</code> a pointer when exiting a scope. <p> <em>T</em> is the type pointed to. <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00037">37</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="927447ba3baf4d6e6cb0573fa502f6b2"></a><!-- doxytag: member="CS::Utility::ScopedDelete::ScopedDelete" ref="927447ba3baf4d6e6cb0573fa502f6b2" args="(T *ptr)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">CS::Utility::ScopedDelete</a>< T >::<a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">ScopedDelete</a> </td> <td>(</td> <td class="paramtype">T * </td> <td class="paramname"> <em>ptr</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Construct from given pointer. <p> <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00042">42</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> </div> </div><p> <a class="anchor" name="47788634526c878b5ae7cfb81b244f43"></a><!-- doxytag: member="CS::Utility::ScopedDelete::~ScopedDelete" ref="47788634526c878b5ae7cfb81b244f43" args="()" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">CS::Utility::ScopedDelete</a>< T >::~<a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">ScopedDelete</a> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destruct. Deletes the given pointer! <p> <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00044">44</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="b9e76603a79234b2bf45174efe1ad8f3"></a><!-- doxytag: member="CS::Utility::ScopedDelete::operator *" ref="b9e76603a79234b2bf45174efe1ad8f3" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">T& <a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">CS::Utility::ScopedDelete</a>< T >::operator * </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Dereference underlying pointer. <p> <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00055">55</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> </div> </div><p> <a class="anchor" name="2b864a9ff832086b51a68c80b44290d8"></a><!-- doxytag: member="CS::Utility::ScopedDelete::operator T *" ref="2b864a9ff832086b51a68c80b44290d8" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">CS::Utility::ScopedDelete</a>< T >::operator T * </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Cast to a pointer. <p> <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00051">51</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> </div> </div><p> <a class="anchor" name="2db49edbaa49511724221782fc1b9eb6"></a><!-- doxytag: member="CS::Utility::ScopedDelete::operator->" ref="2db49edbaa49511724221782fc1b9eb6" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">T* <a class="el" href="classCS_1_1Utility_1_1ScopedDelete.html">CS::Utility::ScopedDelete</a>< T >::operator-> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Dereference underlying pointer. <p> <p>Definition at line <a class="el" href="scopeddelete_8h-source.html#l00047">47</a> of file <a class="el" href="scopeddelete_8h-source.html">scopeddelete.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csutil/<a class="el" href="scopeddelete_8h-source.html">scopeddelete.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>