<!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: csPDelArray< 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> <h1>csPDelArray< T > Class Template Reference</h1><!-- doxytag: class="csPDelArray" --><!-- doxytag: inherits="csArray< T *, csPDelArrayElementHandler< T * > >" -->An array of pointers. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="parray_8h-source.html">csutil/parray.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for csPDelArray< T >:</div> <div class="dynsection"> <p><center><img src="classcsPDelArray__inherit__graph.png" border="0" usemap="#csPDelArray_3_01T_01_4__inherit__map" alt="Inheritance graph"></center> <map name="csPDelArray_3_01T_01_4__inherit__map"> <area shape="rect" href="classcsArray.html" title="csArray\< T *, csPDelArrayElementHandler\< T * \> \>" alt="" coords="5,84,363,111"><area shape="rect" href="classCS_1_1Memory_1_1CustomAllocated.html" title="Class that overrides operator new/operator delete/etc." alt="" coords="73,7,295,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classcsPDelArray-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#17ef6b9277dafde63485439e4110f7d6">csPDelArray</a> (int ilimit=0, int ithreshold=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded. <a href="#17ef6b9277dafde63485439e4110f7d6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#f749cc0e2d1e596ca03394f87a31efc3">Extract</a> (size_t n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract element number 'n' from vector. <a href="#f749cc0e2d1e596ca03394f87a31efc3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#dfa89576037482e615c1f00947c4012d">GetAndClear</a> (size_t n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get and clear the element 'n' from vector. <a href="#dfa89576037482e615c1f00947c4012d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#be6552fd9322dd472301e2f9f97e55d7">Pop</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Pop an element from tail end of array. <a href="#be6552fd9322dd472301e2f9f97e55d7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#e3c641e0efb3c25e04842af14424ae86">SetSize</a> (size_t n, T const &what)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Variant of <a class="el" href="classcsArray.html#256202d18a82451e948c952ba788c44c" title="Set the actual number of items in this array.">SetLength()</a> which copies the pointed-to object instead of the actual pointer. <a href="#e3c641e0efb3c25e04842af14424ae86"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsPDelArray.html#073de722fdb7b97397fabbe8aaf5edb0">SetSize</a> (size_t n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the actual number of items in this array. <a href="#073de722fdb7b97397fabbe8aaf5edb0"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class T><br> class csPDelArray< T ></h3> An array of pointers. <p> No ref counting is done on the elements in this array. Use <a class="el" href="classcsRefArray.html" title="An array of smart pointers.">csRefArray</a> if you want ref counting to happen. This array will delete elements (using 'delete') as needed. This array properly initializes new elements in the array to 0 (the NULL pointer). <p>Definition at line <a class="el" href="parray_8h-source.html#l00064">64</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="17ef6b9277dafde63485439e4110f7d6"></a><!-- doxytag: member="csPDelArray::csPDelArray" ref="17ef6b9277dafde63485439e4110f7d6" args="(int ilimit=0, int ithreshold=0)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsPDelArray.html">csPDelArray</a>< T >::<a class="el" href="classcsPDelArray.html">csPDelArray</a> </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>ilimit</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>ithreshold</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded. <p> <p>Definition at line <a class="el" href="parray_8h-source.html#l00077">77</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="f749cc0e2d1e596ca03394f87a31efc3"></a><!-- doxytag: member="csPDelArray::Extract" ref="f749cc0e2d1e596ca03394f87a31efc3" args="(size_t n)" --> <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="classcsPDelArray.html">csPDelArray</a>< T >::Extract </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Extract element number 'n' from vector. <p> The element is deleted from the array and returned. You are responsible for deleting the pointer later. <p>Definition at line <a class="el" href="parray_8h-source.html#l00097">97</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> </div> </div><p> <a class="anchor" name="dfa89576037482e615c1f00947c4012d"></a><!-- doxytag: member="csPDelArray::GetAndClear" ref="dfa89576037482e615c1f00947c4012d" args="(size_t n)" --> <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="classcsPDelArray.html">csPDelArray</a>< T >::GetAndClear </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get and clear the element 'n' from vector. <p> This spot in the array will be set to 0. You are responsible for deleting the returned pointer later. <p>Definition at line <a class="el" href="parray_8h-source.html#l00085">85</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> <p>Referenced by <a class="el" href="parray_8h-source.html#l00097">csPDelArray< csRenderMeshList::renderMeshListInfo >::Extract()</a>, and <a class="el" href="parray_8h-source.html#l00105">csPDelArray< csRenderMeshList::renderMeshListInfo >::Pop()</a>.</p> </div> </div><p> <a class="anchor" name="be6552fd9322dd472301e2f9f97e55d7"></a><!-- doxytag: member="csPDelArray::Pop" ref="be6552fd9322dd472301e2f9f97e55d7" args="()" --> <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="classcsPDelArray.html">csPDelArray</a>< T >::Pop </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Pop an element from tail end of array. <p> <p>Reimplemented from <a class="el" href="classcsArray.html#655e373ba6de12e2fe2ceda2880f1f89">csArray< T *, csPDelArrayElementHandler< T * > ></a>.</p> <p>Definition at line <a class="el" href="parray_8h-source.html#l00105">105</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> </div> </div><p> <a class="anchor" name="e3c641e0efb3c25e04842af14424ae86"></a><!-- doxytag: member="csPDelArray::SetSize" ref="e3c641e0efb3c25e04842af14424ae86" args="(size_t n, T const &what)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classcsPDelArray.html">csPDelArray</a>< T >::SetSize </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">T const & </td> <td class="paramname"> <em>what</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Variant of <a class="el" href="classcsArray.html#256202d18a82451e948c952ba788c44c" title="Set the actual number of items in this array.">SetLength()</a> which copies the pointed-to object instead of the actual pointer. <p> <p>Definition at line <a class="el" href="parray_8h-source.html#l00129">129</a> of file <a class="el" href="parray_8h-source.html">parray.h</a>.</p> </div> </div><p> <a class="anchor" name="073de722fdb7b97397fabbe8aaf5edb0"></a><!-- doxytag: member="csPDelArray::SetSize" ref="073de722fdb7b97397fabbe8aaf5edb0" args="(size_t n)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class T> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classcsPDelArray.html">csPDelArray</a>< T >::SetSize </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"> <em>n</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the actual number of items in this array. <p> This can be used to shrink an array (like <a class="el" href="classcsArray.html#510c6484ddc358bc86919aecee24724b" title="Truncate array to specified number of elements.">Truncate()</a>) or to enlarge an array, in which case it will properly construct all new items using their default (zero-argument) constructor. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>New array length. </td></tr> </table> </dl> <p>Reimplemented from <a class="el" href="classcsArray.html#ca2e983290d5e5c6d3e18aacc2447fb6">csArray< T *, csPDelArrayElementHandler< T * > ></a>.</p> <p>Definition at line <a class="el" href="parray_8h-source.html#l00120">120</a> of file <a class="el" href="parray_8h-source.html">parray.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="parray_8h-source.html">parray.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>