Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 2774

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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: iArrayChangeAll&lt; T &gt; Struct 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&nbsp;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&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>iArrayChangeAll&lt; T &gt; Struct Template Reference<br>
<small>
[<a class="el" href="group__util__containers.html">Containers</a>]</small>
</h1><!-- doxytag: class="iArrayChangeAll" --><!-- doxytag: inherits="iArrayChangeElements" -->Array interface template, completely changeable.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="iutil_2array_8h-source.html">iutil/array.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for iArrayChangeAll&lt; T &gt;:</div>
<div class="dynsection">
<p><center><img src="structiArrayChangeAll__inherit__graph.png" border="0" usemap="#iArrayChangeAll_3_01T_01_4__inherit__map" alt="Inheritance graph"></center>
<map name="iArrayChangeAll_3_01T_01_4__inherit__map">
<area shape="rect" href="structiArrayChangeElements.html" title="Array interface template, elements are changeable." alt="" coords="5,161,213,188"><area shape="rect" href="structiArrayReadOnly.html" title="Array interface template, read&#45;only." alt="" coords="31,84,188,111"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="81,7,137,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="structiArrayChangeAll-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">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#aadbe10bbd38f317b5db7d70da5d7808">Delete</a> (T const &amp;item)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete the given element from the array.  <a href="#aadbe10bbd38f317b5db7d70da5d7808"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#aa7f467cd25c4ddd9fc219eb8432d2b6">DeleteAll</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear entire array, releasing all allocated memory.  <a href="#aa7f467cd25c4ddd9fc219eb8432d2b6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#17ad112d4dea8c7668aa962f2186c21a">DeleteIndex</a> (size_t n)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete an element from the array.  <a href="#17ad112d4dea8c7668aa962f2186c21a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#3d1c6002328ad490a6adf3539b23f448">DeleteIndexFast</a> (size_t n)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete an element from the array in constant-time, regardless of the array's size.  <a href="#3d1c6002328ad490a6adf3539b23f448"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#def4f0fbb60ff7174a74bf11d580c2f7">Empty</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all elements.  <a href="#def4f0fbb60ff7174a74bf11d580c2f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#776ed11bb011ed93877a5a9b1bc374bb">GetExtend</a> (size_t n)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an item from the array.  <a href="#776ed11bb011ed93877a5a9b1bc374bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#8253480032393d7d58b8c57bd5f1f00b">Insert</a> (size_t n, T const &amp;item)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert element <code>item</code> before element <code>n</code>.  <a href="#8253480032393d7d58b8c57bd5f1f00b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#50f0d70e6f3c8fd0320cec087484a1e6">Pop</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pop an element from tail end of array.  <a href="#50f0d70e6f3c8fd0320cec087484a1e6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#a648fc0d73451acd2df2d88527a687db">Push</a> (T const &amp;what)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push a copy of an element onto the tail end of the array.  <a href="#a648fc0d73451acd2df2d88527a687db"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#b14c3336c5cf44e8281fa680885e7a11">PushSmart</a> (T const &amp;what)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Push a element onto the tail end of the array if not already present.  <a href="#b14c3336c5cf44e8281fa680885e7a11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#d4203e8c720fd5cf63105b1bb719e2b5">Put</a> (size_t n, T const &amp;what)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Insert a copy of element at the indicated position.  <a href="#d4203e8c720fd5cf63105b1bb719e2b5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#bdb46bff30afb87b54669eabff01f104">SetSize</a> (size_t n)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the actual number of items in this array.  <a href="#bdb46bff30afb87b54669eabff01f104"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#0cbbef05612215a4a8d9b4afbd71e2be">SetSize</a> (size_t n, T const &amp;what)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the actual number of items in this array.  <a href="#0cbbef05612215a4a8d9b4afbd71e2be"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiArrayChangeAll.html#1ede306c0902e510ab6a6fee1afe38b5">Truncate</a> (size_t n)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Truncate array to specified number of elements.  <a href="#1ede306c0902e510ab6a6fee1afe38b5"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename T&gt;<br>
 struct iArrayChangeAll&lt; T &gt;</h3>

Array interface template, completely changeable. 
<p>
Extents <a class="el" href="structiArrayChangeElements.html" title="Array interface template, elements are changeable.">iArrayChangeElements</a> to also support adding new elements and removing existing elements.<p>
This template can't be used as-is in another interface; rather, it must be derived and specialized before it can be used. Example: <div class="fragment"><pre class="fragment"> <span class="keyword">struct </span>csBaz { ... };
 <span class="keyword">struct </span>iBazArray : <span class="keyword">public</span> <a class="code" href="structiArrayChangeAll.html" title="Array interface template, completely changeable.">iArrayChangeAll</a>&lt;csBaz&gt;
 {
   <a class="code" href="group__util__containers.html#g4ea191f7c63ce4d230d82d181b801f61" title="Macro to define interface version of an iArrayChangeAll-derived interface.">SCF_IARRAYCHANGEALL_INTERFACE</a>(iBarArray);
 };
</pre></div><p>
Standard implementations for this interface are <a class="el" href="classscfArray.html" title="Implementation for iArrayReadOnly&lt;&gt;-, iArrayChangeElements&lt;&gt;- and iArrayChangeAll&lt;&gt...">scfArray</a> and <a class="el" href="classscfArrayWrap.html" title="Implementation for iArrayReadOnly&lt;&gt;-, iArrayChangeElements&lt;&gt;- and iArrayChangeAll&lt;&gt...">scfArrayWrap</a>. 
<p>Definition at line <a class="el" href="iutil_2array_8h-source.html#l00151">151</a> of file <a class="el" href="iutil_2array_8h-source.html">array.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="aadbe10bbd38f317b5db7d70da5d7808"></a><!-- doxytag: member="iArrayChangeAll::Delete" ref="aadbe10bbd38f317b5db7d70da5d7808" args="(T const &amp;item)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Delete           </td>
          <td>(</td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>item</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete the given element from the array. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Performs a linear search of the array to locate <code>item</code>, thus it may be slow for large arrays. </dd></dl>

</div>
</div><p>
<a class="anchor" name="aa7f467cd25c4ddd9fc219eb8432d2b6"></a><!-- doxytag: member="iArrayChangeAll::DeleteAll" ref="aa7f467cd25c4ddd9fc219eb8432d2b6" args="()=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::DeleteAll           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clear entire array, releasing all allocated memory. 
<p>

</div>
</div><p>
<a class="anchor" name="17ad112d4dea8c7668aa962f2186c21a"></a><!-- doxytag: member="iArrayChangeAll::DeleteIndex" ref="17ad112d4dea8c7668aa962f2186c21a" args="(size_t n)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::DeleteIndex           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete an element from the array. 
<p>
return True if the indicated item index was valid, else false. <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Deletion speed is proportional to the size of the array and the location of the element being deleted. If the order of the elements in the array is not important, then you can instead use <a class="el" href="structiArrayChangeAll.html#3d1c6002328ad490a6adf3539b23f448" title="Delete an element from the array in constant-time, regardless of the array&#39;s...">DeleteIndexFast()</a> for constant-time deletion. </dd></dl>

</div>
</div><p>
<a class="anchor" name="3d1c6002328ad490a6adf3539b23f448"></a><!-- doxytag: member="iArrayChangeAll::DeleteIndexFast" ref="3d1c6002328ad490a6adf3539b23f448" args="(size_t n)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::DeleteIndexFast           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Delete an element from the array in constant-time, regardless of the array's size. 
<p>
return True if the indicated item index was valid, else false. <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This is a special version of <a class="el" href="structiArrayChangeAll.html#17ad112d4dea8c7668aa962f2186c21a" title="Delete an element from the array.">DeleteIndex()</a> which does not preserve the order of the remaining elements. This characteristic allows deletions to be performed in constant-time, regardless of the size of the array. </dd></dl>

</div>
</div><p>
<a class="anchor" name="def4f0fbb60ff7174a74bf11d580c2f7"></a><!-- doxytag: member="iArrayChangeAll::Empty" ref="def4f0fbb60ff7174a74bf11d580c2f7" args="()=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Empty           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove all elements. 
<p>
Similar to <a class="el" href="structiArrayChangeAll.html#aa7f467cd25c4ddd9fc219eb8432d2b6" title="Clear entire array, releasing all allocated memory.">DeleteAll()</a>, but does not release memory used by the array itself, thus making it more efficient for cases when the number of contained elements will fluctuate. 
</div>
</div><p>
<a class="anchor" name="776ed11bb011ed93877a5a9b1bc374bb"></a><!-- doxytag: member="iArrayChangeAll::GetExtend" ref="776ed11bb011ed93877a5a9b1bc374bb" args="(size_t n)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual T&amp; <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::GetExtend           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get an item from the array. 
<p>
If the number of elements in this array is too small the array will be automatically extended, and the newly added objects will be created using their default (no-argument) constructor. 
</div>
</div><p>
<a class="anchor" name="8253480032393d7d58b8c57bd5f1f00b"></a><!-- doxytag: member="iArrayChangeAll::Insert" ref="8253480032393d7d58b8c57bd5f1f00b" args="(size_t n, T const &amp;item)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Insert           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>item</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Insert element <code>item</code> before element <code>n</code>. 
<p>

</div>
</div><p>
<a class="anchor" name="50f0d70e6f3c8fd0320cec087484a1e6"></a><!-- doxytag: member="iArrayChangeAll::Pop" ref="50f0d70e6f3c8fd0320cec087484a1e6" args="()=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual T <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Pop           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pop an element from tail end of array. 
<p>

</div>
</div><p>
<a class="anchor" name="a648fc0d73451acd2df2d88527a687db"></a><!-- doxytag: member="iArrayChangeAll::Push" ref="a648fc0d73451acd2df2d88527a687db" args="(T const &amp;what)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Push           </td>
          <td>(</td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>what</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Push a copy of an element onto the tail end of the array. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Index of newly added element. </dd></dl>

</div>
</div><p>
<a class="anchor" name="b14c3336c5cf44e8281fa680885e7a11"></a><!-- doxytag: member="iArrayChangeAll::PushSmart" ref="b14c3336c5cf44e8281fa680885e7a11" args="(T const &amp;what)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::PushSmart           </td>
          <td>(</td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>what</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Push a element onto the tail end of the array if not already present. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Index of newly pushed element or index of already present element. </dd></dl>

</div>
</div><p>
<a class="anchor" name="d4203e8c720fd5cf63105b1bb719e2b5"></a><!-- doxytag: member="iArrayChangeAll::Put" ref="d4203e8c720fd5cf63105b1bb719e2b5" args="(size_t n, T const &amp;what)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Put           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>what</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Insert a copy of element at the indicated position. 
<p>

</div>
</div><p>
<a class="anchor" name="bdb46bff30afb87b54669eabff01f104"></a><!-- doxytag: member="iArrayChangeAll::SetSize" ref="bdb46bff30afb87b54669eabff01f104" args="(size_t n)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::SetSize           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</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="structiArrayChangeAll.html#1ede306c0902e510ab6a6fee1afe38b5" 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>&nbsp;</td><td>New array length. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="0cbbef05612215a4a8d9b4afbd71e2be"></a><!-- doxytag: member="iArrayChangeAll::SetSize" ref="0cbbef05612215a4a8d9b4afbd71e2be" args="(size_t n, T const &amp;what)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::SetSize           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T const &amp;&nbsp;</td>
          <td class="paramname"> <em>what</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [pure virtual]</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="structiArrayChangeAll.html#1ede306c0902e510ab6a6fee1afe38b5" 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 based on the given item. <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>&nbsp;</td><td>New array length. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>what</em>&nbsp;</td><td>Object used as template to construct each newly added object using the object's copy constructor when the array size is increased by this method. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="1ede306c0902e510ab6a6fee1afe38b5"></a><!-- doxytag: member="iArrayChangeAll::Truncate" ref="1ede306c0902e510ab6a6fee1afe38b5" args="(size_t n)=0" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structiArrayChangeAll.html">iArrayChangeAll</a>&lt; T &gt;::Truncate           </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Truncate array to specified number of elements. 
<p>
The new number of elements cannot exceed the current number of elements. <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Does not reclaim memory used by the array itself, though the removed objects are destroyed. To reclaim the array's memory invoke ShrinkBestFit(), or <a class="el" href="structiArrayChangeAll.html#aa7f467cd25c4ddd9fc219eb8432d2b6" title="Clear entire array, releasing all allocated memory.">DeleteAll()</a> if you want to release all allocated resources.<p>
The more general-purpose <a class="el" href="structiArrayChangeAll.html#0cbbef05612215a4a8d9b4afbd71e2be" title="Set the actual number of items in this array.">SetSize()</a> method can also enlarge the array. </dd></dl>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>iutil/<a class="el" href="iutil_2array_8h-source.html">array.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>