Fixed stdlib error for free() on pointer allocated with gc_alloc()
[libs.git] / docs / html / class_sylph_1_1_array__base.html
blobf4f5eb9c698ff66e19b364f40acd28dbf59cb263
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 <title>LibSylph: Sylph::Array_base&lt; T &gt; Class Template Reference</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.5.8 -->
7 <div class="navigation" id="top">
8 <div class="tabs">
9 <ul>
10 <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
12 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
13 <li><a href="files.html"><span>Files</span></a></li>
14 </ul>
15 </div>
16 <div class="tabs">
17 <ul>
18 <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
19 <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
20 <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
21 </ul>
22 </div>
23 <div class="navpath"><a class="el" href="namespace_sylph.html">Sylph</a>::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>
24 </div>
25 </div>
26 <div class="contents">
27 <h1>Sylph::Array_base&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="Sylph::Array_base" --><!-- doxytag: inherits="Sylph::Object" --><a class="el" href="class_sylph_1_1_array__base.html" title="Array_base provides a base class for the specialisations of Array.">Array_base</a> provides a base class for the specialisations of <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
28 <a href="#_details">More...</a>
29 <p>
30 <code>#include &lt;<a class="el" href="_array_8h-source.html">Sylph/Core/Array.h</a>&gt;</code>
31 <p>
32 Inherits <a class="el" href="class_sylph_1_1_object.html">Sylph::Object</a>.
33 <p>
34 <div class="dynheader">
35 Collaboration diagram for Sylph::Array_base&lt; T &gt;:</div>
36 <div class="dynsection">
37 <p><center><img src="class_sylph_1_1_array__base__coll__graph.png" border="0" usemap="#_sylph_1_1_array__base_3_01_t_01_4__coll__map" alt="Collaboration graph"></center>
38 <map name="_sylph_1_1_array__base_3_01_t_01_4__coll__map">
39 <area shape="rect" href="class_sylph_1_1_object.html" title="The root of all classes." alt="" coords="52,7,182,34"></map>
40 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
42 <p>
43 <a href="class_sylph_1_1_array__base-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
44 <tr><td></td></tr>
45 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
46 <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#49faf4a398f6925ef313e086b79de63d">FilterFunction</a> )(const T &amp;, Any &amp;)</td></tr>
48 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A function that is used for filtering by the <a class="el" href="class_sylph_1_1_array__base.html#091048e5c8dbac212c0b3673105f19f4" title="This will filter the Array according to a FilterFunction.">filter()</a> method. <a href="#49faf4a398f6925ef313e086b79de63d"></a><br></td></tr>
49 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
50 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_sylph_1_1_sylph_iterator.html">Iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#5d40ad5a3a5cfa389ceccaf538bbeed3">getIterator</a> () const </td></tr>
52 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">\ * Get an instance of the Iterator for this class. <a href="#5d40ad5a3a5cfa389ceccaf538bbeed3"></a><br></td></tr>
53 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_sylph_1_1_sylph_iterator.html">MutableIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#b81bc1e841aee825025e01a091d099fa">getMutableIterator</a> ()</td></tr>
55 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">\ * Get an instance of the MutableIterator for this class. <a href="#b81bc1e841aee825025e01a091d099fa"></a><br></td></tr>
56 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_sylph_iterator.html">Iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#5fb93de308fc7b989b26aeafe49b74f2">itr</a> ()</td></tr>
58 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"> \ * Alias for <a class="el" href="class_sylph_1_1_array__base.html#5d40ad5a3a5cfa389ceccaf538bbeed3" title="\ * Get an instance of the Iterator for this class.">getIterator()</a> \ *. <a href="#5fb93de308fc7b989b26aeafe49b74f2"></a><br></td></tr>
59 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_sylph_iterator.html">MutableIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#abe400ebd4ec8f44437600053a236642">mitr</a> ()</td></tr>
61 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"> \ * Alias for <a class="el" href="class_sylph_1_1_array__base.html#b81bc1e841aee825025e01a091d099fa" title="\ * Get an instance of the MutableIterator for this class.">getMutableIterator()</a> \ *. <a href="#abe400ebd4ec8f44437600053a236642"></a><br></td></tr>
62 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#d3aeaedb14cf9e16d89d984dec94f1c8">Array_base</a> (std::size_t len)</td></tr>
64 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new array with the given length. <a href="#d3aeaedb14cf9e16d89d984dec94f1c8"></a><br></td></tr>
65 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#3bd1c3fe7e09a02f65a37305a8a44354">Array_base</a> (const std::initializer_list&lt; T &gt; &amp;il)</td></tr>
67 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an array from an initializer list. <a href="#3bd1c3fe7e09a02f65a37305a8a44354"></a><br></td></tr>
68 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#023355b2922322c88a22cdbbbb8627d7">Array_base</a> (const T array[])</td></tr>
70 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an array from a C-style array. <a href="#023355b2922322c88a22cdbbbb8627d7"></a><br></td></tr>
71 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#3431dd919f30b460e22ce17bc4eb7201">Array_base</a> (const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt; &amp;other)</td></tr>
73 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <a href="#3431dd919f30b460e22ce17bc4eb7201"></a><br></td></tr>
74 <tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#e1e5d6a7e2f10976ef723f2a2e3ccb43">Array_base</a> (const basic_range&lt; T &gt; &amp;ran)</td></tr>
76 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an array from a range. <a href="#e1e5d6a7e2f10976ef723f2a2e3ccb43"></a><br></td></tr>
77 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#ba4bbe4984097bf6b01d1b609908a69c">~Array_base</a> ()</td></tr>
79 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#ba4bbe4984097bf6b01d1b609908a69c"></a><br></td></tr>
80 <tr><td class="memItemLeft" nowrap align="right" valign="top">T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#25e994e2aa038f81d051b5eeb3f18fbe">carray</a> ()</td></tr>
82 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a c-style array representing the contents of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. <a href="#25e994e2aa038f81d051b5eeb3f18fbe"></a><br></td></tr>
83 <tr><td class="memItemLeft" nowrap align="right" valign="top">const T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#e3543239f348f41073145cd268b088df">carray</a> () const </td></tr>
85 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a c-style array representing the contents of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. <a href="#e3543239f348f41073145cd268b088df"></a><br></td></tr>
86 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#e7a6c13ecec4a481157642792803be81">copy</a> ()</td></tr>
88 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of this array. <a href="#e7a6c13ecec4a481157642792803be81"></a><br></td></tr>
89 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#091048e5c8dbac212c0b3673105f19f4">filter</a> (<a class="el" href="class_sylph_1_1_array__base.html#49faf4a398f6925ef313e086b79de63d">FilterFunction</a> func, Any &amp;clientData)</td></tr>
91 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This will filter the <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> according to a FilterFunction. <a href="#091048e5c8dbac212c0b3673105f19f4"></a><br></td></tr>
92 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#83d93f791355c482ffabe7847df268eb">operator=</a> (const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt; &amp;other)</td></tr>
94 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Swaps the data pointer of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> with the other <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. <a href="#83d93f791355c482ffabe7847df268eb"></a><br></td></tr>
95 <tr><td class="memItemLeft" nowrap align="right" valign="top">T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#3d34f036dbd0b5c4c00c9bb81cd5c074">operator[]</a> (std::sidx_t idx) throw (Exception)</td></tr>
97 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for accessing the Array's contents. <a href="#3d34f036dbd0b5c4c00c9bb81cd5c074"></a><br></td></tr>
98 <tr><td class="memItemLeft" nowrap align="right" valign="top">const T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#40145e7fb31875d72db1154fb2b2af85">operator[]</a> (std::sidx_t idx) const throw (Exception)</td></tr>
100 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the <code>const</code> version of T&amp; operator[] . <a href="#40145e7fb31875d72db1154fb2b2af85"></a><br></td></tr>
101 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#308283745b367bf50c03db6b184b48c9">operator[]</a> (const range &amp;ran) throw (Exception)</td></tr>
103 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Slices the array and returns the subarray. <a href="#308283745b367bf50c03db6b184b48c9"></a><br></td></tr>
104 <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#8db59a5223c5c91bc38121f1cee728ac">operator[]</a> (const range &amp;ran) const throw (Exception)</td></tr>
106 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Const-version of <a class="el" href="class_sylph_1_1_array__base.html#308283745b367bf50c03db6b184b48c9" title="Slices the array and returns the subarray.">operator[](const range &amp;)</a> . <a href="#8db59a5223c5c91bc38121f1cee728ac"></a><br></td></tr>
107 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
108 <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_sylph_1_1_array.html">Array</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#8ae028dd923ec6db535b98b10234ad5e">fromPointer</a> (std::size_t <a class="el" href="class_sylph_1_1_array__base.html#b1c91dee8cfdaea416e97b4ef1884454">length</a>, T *orig)</td></tr>
110 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an Array&lt;T&gt; from a pointer to T and a length. <a href="#8ae028dd923ec6db535b98b10234ad5e"></a><br></td></tr>
111 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
112 <tr><td class="memItemLeft" nowrap align="right" valign="top">const int &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_array__base.html#b1c91dee8cfdaea416e97b4ef1884454">length</a></td></tr>
114 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The length of the array. <a href="#b1c91dee8cfdaea416e97b4ef1884454"></a><br></td></tr>
115 </table>
116 <hr><a name="_details"></a><h2>Detailed Description</h2>
117 <h3>template&lt;class T&gt;<br>
118 class Sylph::Array_base&lt; T &gt;</h3>
120 <a class="el" href="class_sylph_1_1_array__base.html" title="Array_base provides a base class for the specialisations of Array.">Array_base</a> provides a base class for the specialisations of <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
122 <b>DO NOT USE DIRECTLY!</b> <hr><h2>Member Typedef Documentation</h2>
123 <a class="anchor" name="49faf4a398f6925ef313e086b79de63d"></a><!-- doxytag: member="Sylph::Array_base::FilterFunction" ref="49faf4a398f6925ef313e086b79de63d" args=")(const T &amp;, Any &amp;)" -->
124 <div class="memitem">
125 <div class="memproto">
126 <div class="memtemplate">
127 template&lt;class T&gt; </div>
128 <table class="memname">
129 <tr>
130 <td class="memname">typedef bool(* <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html#49faf4a398f6925ef313e086b79de63d">FilterFunction</a>)(const T &amp;, Any &amp;) </td>
131 </tr>
132 </table>
133 </div>
134 <div class="memdoc">
137 A function that is used for filtering by the <a class="el" href="class_sylph_1_1_array__base.html#091048e5c8dbac212c0b3673105f19f4" title="This will filter the Array according to a FilterFunction.">filter()</a> method.
139 This function takes both an instance of the class this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> contains, and a reference to a reference to any kind of other data that may need to be passed to the FilterFunction.
140 </div>
141 </div><p>
142 <hr><h2>Constructor &amp; Destructor Documentation</h2>
143 <a class="anchor" name="d3aeaedb14cf9e16d89d984dec94f1c8"></a><!-- doxytag: member="Sylph::Array_base::Array_base" ref="d3aeaedb14cf9e16d89d984dec94f1c8" args="(std::size_t len)" -->
144 <div class="memitem">
145 <div class="memproto">
146 <div class="memtemplate">
147 template&lt;class T&gt; </div>
148 <table class="memname">
149 <tr>
150 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
151 <td>(</td>
152 <td class="paramtype">std::size_t&nbsp;</td>
153 <td class="paramname"> <em>len</em> </td>
154 <td>&nbsp;)&nbsp;</td>
155 <td><code> [inline, explicit]</code></td>
156 </tr>
157 </table>
158 </div>
159 <div class="memdoc">
162 Creates a new array with the given length.
164 A new instance of the reference counted data is created, its refcount set to 1. The memory gets zeroed, so it is perfectly safe to compare with 0 to see if a particular entry in the array has been initialized. <dl compact><dt><b>Parameters:</b></dt><dd>
165 <table border="0" cellspacing="2" cellpadding="0">
166 <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>the length of the new <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. </td></tr>
167 </table>
168 </dl>
170 </div>
171 </div><p>
172 <a class="anchor" name="3bd1c3fe7e09a02f65a37305a8a44354"></a><!-- doxytag: member="Sylph::Array_base::Array_base" ref="3bd1c3fe7e09a02f65a37305a8a44354" args="(const std::initializer_list&lt; T &gt; &amp;il)" -->
173 <div class="memitem">
174 <div class="memproto">
175 <div class="memtemplate">
176 template&lt;class T&gt; </div>
177 <table class="memname">
178 <tr>
179 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
180 <td>(</td>
181 <td class="paramtype">const std::initializer_list&lt; T &gt; &amp;&nbsp;</td>
182 <td class="paramname"> <em>il</em> </td>
183 <td>&nbsp;)&nbsp;</td>
184 <td><code> [inline]</code></td>
185 </tr>
186 </table>
187 </div>
188 <div class="memdoc">
191 Creates an array from an initializer list.
193 The length is the same as the length of the initializer list. A new instance of the reference counted data is created, its refcount set to 1. <dl compact><dt><b>Parameters:</b></dt><dd>
194 <table border="0" cellspacing="2" cellpadding="0">
195 <tr><td valign="top"></td><td valign="top"><em>il</em>&nbsp;</td><td>the initializer list </td></tr>
196 </table>
197 </dl>
199 </div>
200 </div><p>
201 <a class="anchor" name="023355b2922322c88a22cdbbbb8627d7"></a><!-- doxytag: member="Sylph::Array_base::Array_base" ref="023355b2922322c88a22cdbbbb8627d7" args="(const T array[])" -->
202 <div class="memitem">
203 <div class="memproto">
204 <div class="memtemplate">
205 template&lt;class T&gt; </div>
206 <table class="memname">
207 <tr>
208 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
209 <td>(</td>
210 <td class="paramtype">const T&nbsp;</td>
211 <td class="paramname"> <em>array</em>[] </td>
212 <td>&nbsp;)&nbsp;</td>
213 <td><code> [inline]</code></td>
214 </tr>
215 </table>
216 </div>
217 <div class="memdoc">
220 Creates an array from a C-style array.
222 The contents of the array are copied into this array. The original array will not be modified. The length is the same as the length of the C array. A new instance of the reference counted data is created, its refcount set to 1. <dl compact><dt><b>Parameters:</b></dt><dd>
223 <table border="0" cellspacing="2" cellpadding="0">
224 <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>the c-style array </td></tr>
225 </table>
226 </dl>
228 </div>
229 </div><p>
230 <a class="anchor" name="3431dd919f30b460e22ce17bc4eb7201"></a><!-- doxytag: member="Sylph::Array_base::Array_base" ref="3431dd919f30b460e22ce17bc4eb7201" args="(const Array_base&lt; T &gt; &amp;other)" -->
231 <div class="memitem">
232 <div class="memproto">
233 <div class="memtemplate">
234 template&lt;class T&gt; </div>
235 <table class="memname">
236 <tr>
237 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
238 <td>(</td>
239 <td class="paramtype">const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt; &amp;&nbsp;</td>
240 <td class="paramname"> <em>other</em> </td>
241 <td>&nbsp;)&nbsp;</td>
242 <td><code> [inline]</code></td>
243 </tr>
244 </table>
245 </div>
246 <div class="memdoc">
249 Copy constructor.
251 As <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> is reference-counted, it will just copy the pointer to the internal reference and increase the counter by 1. <dl compact><dt><b>Parameters:</b></dt><dd>
252 <table border="0" cellspacing="2" cellpadding="0">
253 <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>A reference to the other <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. </td></tr>
254 </table>
255 </dl>
257 </div>
258 </div><p>
259 <a class="anchor" name="e1e5d6a7e2f10976ef723f2a2e3ccb43"></a><!-- doxytag: member="Sylph::Array_base::Array_base" ref="e1e5d6a7e2f10976ef723f2a2e3ccb43" args="(const basic_range&lt; T &gt; &amp;ran)" -->
260 <div class="memitem">
261 <div class="memproto">
262 <div class="memtemplate">
263 template&lt;class T&gt; </div>
264 <table class="memname">
265 <tr>
266 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
267 <td>(</td>
268 <td class="paramtype">const basic_range&lt; T &gt; &amp;&nbsp;</td>
269 <td class="paramname"> <em>ran</em> </td>
270 <td>&nbsp;)&nbsp;</td>
271 <td><code> [inline]</code></td>
272 </tr>
273 </table>
274 </div>
275 <div class="memdoc">
278 Creates an array from a range.
280 The following syntax <pre> Array&lt;int&gt;(range(X, Y)); </pre> is just shorthand for <pre>Array&lt;int&gt;(Y-X) arr;
281 for(int i = X; i &lt; Y; i++) arr[i]=X+i;</pre> A new shared data pointer gets created. Length is equal to ran.last() - ran.first() . In order for this constructor to be useful, operator&lt; and operator++ need to have meaningful implementations. <dl compact><dt><b>Parameters:</b></dt><dd>
282 <table border="0" cellspacing="2" cellpadding="0">
283 <tr><td valign="top"></td><td valign="top"><em>ran</em>&nbsp;</td><td>The range describing the contents of the array. </td></tr>
284 </table>
285 </dl>
287 </div>
288 </div><p>
289 <a class="anchor" name="ba4bbe4984097bf6b01d1b609908a69c"></a><!-- doxytag: member="Sylph::Array_base::~Array_base" ref="ba4bbe4984097bf6b01d1b609908a69c" args="()" -->
290 <div class="memitem">
291 <div class="memproto">
292 <div class="memtemplate">
293 template&lt;class T&gt; </div>
294 <table class="memname">
295 <tr>
296 <td class="memname">virtual <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::~<a class="el" href="class_sylph_1_1_array__base.html">Array_base</a> </td>
297 <td>(</td>
298 <td class="paramname"> </td>
299 <td>&nbsp;)&nbsp;</td>
300 <td><code> [inline, virtual]</code></td>
301 </tr>
302 </table>
303 </div>
304 <div class="memdoc">
307 Destructor.
309 This will decrease the reference counter by one. If the counter reaches zero, the backing data will be deleted.
310 </div>
311 </div><p>
312 <hr><h2>Member Function Documentation</h2>
313 <a class="anchor" name="e3543239f348f41073145cd268b088df"></a><!-- doxytag: member="Sylph::Array_base::carray" ref="e3543239f348f41073145cd268b088df" args="() const " -->
314 <div class="memitem">
315 <div class="memproto">
316 <div class="memtemplate">
317 template&lt;class T&gt; </div>
318 <table class="memname">
319 <tr>
320 <td class="memname">const T* <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::carray </td>
321 <td>(</td>
322 <td class="paramname"> </td>
323 <td>&nbsp;)&nbsp;</td>
324 <td> const<code> [inline]</code></td>
325 </tr>
326 </table>
327 </div>
328 <div class="memdoc">
331 Returns a c-style array representing the contents of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
333 The array returned is not a copy of this array, in fact, changes to the returned array are reflected in this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. This version returns a const c-style array and is used when this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> is const.
334 </div>
335 </div><p>
336 <a class="anchor" name="25e994e2aa038f81d051b5eeb3f18fbe"></a><!-- doxytag: member="Sylph::Array_base::carray" ref="25e994e2aa038f81d051b5eeb3f18fbe" args="()" -->
337 <div class="memitem">
338 <div class="memproto">
339 <div class="memtemplate">
340 template&lt;class T&gt; </div>
341 <table class="memname">
342 <tr>
343 <td class="memname">T* <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::carray </td>
344 <td>(</td>
345 <td class="paramname"> </td>
346 <td>&nbsp;)&nbsp;</td>
347 <td><code> [inline]</code></td>
348 </tr>
349 </table>
350 </div>
351 <div class="memdoc">
354 Returns a c-style array representing the contents of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
356 The array returned is not a copy of this array, in fact, changes to the returned array are reflected in this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
357 </div>
358 </div><p>
359 <a class="anchor" name="e7a6c13ecec4a481157642792803be81"></a><!-- doxytag: member="Sylph::Array_base::copy" ref="e7a6c13ecec4a481157642792803be81" args="()" -->
360 <div class="memitem">
361 <div class="memproto">
362 <div class="memtemplate">
363 template&lt;class T&gt; </div>
364 <table class="memname">
365 <tr>
366 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt;T&gt; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::copy </td>
367 <td>(</td>
368 <td class="paramname"> </td>
369 <td>&nbsp;)&nbsp;</td>
370 <td><code> [inline]</code></td>
371 </tr>
372 </table>
373 </div>
374 <div class="memdoc">
377 Creates a copy of this array.
379 The <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> returned from this method is an exact copy of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>, such that ar == ar.copy() . The returned <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> is different from the one returned by operator=, as the reference counted data gets copied as well, in other words, both Arrays will have a different, equal instance of the reference counted data. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A new <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> containing the same data as this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>. </dd></dl>
381 </div>
382 </div><p>
383 <a class="anchor" name="091048e5c8dbac212c0b3673105f19f4"></a><!-- doxytag: member="Sylph::Array_base::filter" ref="091048e5c8dbac212c0b3673105f19f4" args="(FilterFunction func, Any &amp;clientData)" -->
384 <div class="memitem">
385 <div class="memproto">
386 <div class="memtemplate">
387 template&lt;class T&gt; </div>
388 <table class="memname">
389 <tr>
390 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt;T&gt; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::filter </td>
391 <td>(</td>
392 <td class="paramtype"><a class="el" href="class_sylph_1_1_array__base.html#49faf4a398f6925ef313e086b79de63d">FilterFunction</a>&nbsp;</td>
393 <td class="paramname"> <em>func</em>, </td>
394 </tr>
395 <tr>
396 <td class="paramkey"></td>
397 <td></td>
398 <td class="paramtype">Any &amp;&nbsp;</td>
399 <td class="paramname"> <em>clientData</em></td><td>&nbsp;</td>
400 </tr>
401 <tr>
402 <td></td>
403 <td>)</td>
404 <td></td><td></td><td><code> [inline]</code></td>
405 </tr>
406 </table>
407 </div>
408 <div class="memdoc">
411 This will filter the <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> according to a FilterFunction.
413 This function returns a new, 'filtered' <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>, which only contains the entries for which the FilterFunction returns true. <dl compact><dt><b>Parameters:</b></dt><dd>
414 <table border="0" cellspacing="2" cellpadding="0">
415 <tr><td valign="top"></td><td valign="top"><em>func</em>&nbsp;</td><td>A pointer to the function which is used for filtering </td></tr>
416 <tr><td valign="top"></td><td valign="top"><em>clientData</em>&nbsp;</td><td>Any data to be passed to the FilterFunction </td></tr>
417 </table>
418 </dl>
419 <dl class="return" compact><dt><b>Returns:</b></dt><dd>A new array containing only the filtered data </dd></dl>
421 </div>
422 </div><p>
423 <a class="anchor" name="8ae028dd923ec6db535b98b10234ad5e"></a><!-- doxytag: member="Sylph::Array_base::fromPointer" ref="8ae028dd923ec6db535b98b10234ad5e" args="(std::size_t length, T *orig)" -->
424 <div class="memitem">
425 <div class="memproto">
426 <div class="memtemplate">
427 template&lt;class T&gt; </div>
428 <table class="memname">
429 <tr>
430 <td class="memname">static <a class="el" href="class_sylph_1_1_array.html">Array</a>&lt;T&gt; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::fromPointer </td>
431 <td>(</td>
432 <td class="paramtype">std::size_t&nbsp;</td>
433 <td class="paramname"> <em>length</em>, </td>
434 </tr>
435 <tr>
436 <td class="paramkey"></td>
437 <td></td>
438 <td class="paramtype">T *&nbsp;</td>
439 <td class="paramname"> <em>orig</em></td><td>&nbsp;</td>
440 </tr>
441 <tr>
442 <td></td>
443 <td>)</td>
444 <td></td><td></td><td><code> [inline, static]</code></td>
445 </tr>
446 </table>
447 </div>
448 <div class="memdoc">
451 Creates an Array&lt;T&gt; from a pointer to T and a length.
453 The new array will have the length specified in <code>length</code>. The original array will not be modified, the contents are copied. No bounds-checking is done, therefore, use this function at your own responsability! <dl compact><dt><b>Parameters:</b></dt><dd>
454 <table border="0" cellspacing="2" cellpadding="0">
455 <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The length of the original C array </td></tr>
456 <tr><td valign="top"></td><td valign="top"><em>orig</em>&nbsp;</td><td>The original C array, supplied as a pointer. </td></tr>
457 </table>
458 </dl>
460 </div>
461 </div><p>
462 <a class="anchor" name="5d40ad5a3a5cfa389ceccaf538bbeed3"></a><!-- doxytag: member="Sylph::Array_base::getIterator" ref="5d40ad5a3a5cfa389ceccaf538bbeed3" args="() const " -->
463 <div class="memitem">
464 <div class="memproto">
465 <div class="memtemplate">
466 template&lt;class T&gt; </div>
467 <table class="memname">
468 <tr>
469 <td class="memname">virtual <a class="el" href="class_sylph_1_1_sylph_iterator.html">Iterator</a> <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::getIterator </td>
470 <td>(</td>
471 <td class="paramname"> </td>
472 <td>&nbsp;)&nbsp;</td>
473 <td> const<code> [virtual]</code></td>
474 </tr>
475 </table>
476 </div>
477 <div class="memdoc">
480 \ * Get an instance of the Iterator for this class.
482 The iterator returned \ * is not mutable, i.e. it cannot modify the contents of the collection.<p>
483 \ * Unless mutability is really required, it is recommended to prefer this\ * method, as it does not allow accidential modifications. * <dl class="return" compact><dt><b>Returns:</b></dt><dd>An <a class="el" href="class_sylph_1_1_sylph_iterator.html" title="SylphIterator provides a easier-to-use wrapper around STL iterators.">SylphIterator</a> specific for the class being iterated over. </dd></dl>
485 </div>
486 </div><p>
487 <a class="anchor" name="b81bc1e841aee825025e01a091d099fa"></a><!-- doxytag: member="Sylph::Array_base::getMutableIterator" ref="b81bc1e841aee825025e01a091d099fa" args="()" -->
488 <div class="memitem">
489 <div class="memproto">
490 <div class="memtemplate">
491 template&lt;class T&gt; </div>
492 <table class="memname">
493 <tr>
494 <td class="memname">virtual <a class="el" href="class_sylph_1_1_sylph_iterator.html">MutableIterator</a> <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::getMutableIterator </td>
495 <td>(</td>
496 <td class="paramname"> </td>
497 <td>&nbsp;)&nbsp;</td>
498 <td><code> [virtual]</code></td>
499 </tr>
500 </table>
501 </div>
502 <div class="memdoc">
505 \ * Get an instance of the MutableIterator for this class.
507 The iterator\ * returned is mutable, i.e. it can modifiy the contents of the collection. * <dl class="return" compact><dt><b>Returns:</b></dt><dd>A mutable <a class="el" href="class_sylph_1_1_sylph_iterator.html" title="SylphIterator provides a easier-to-use wrapper around STL iterators.">SylphIterator</a> for the class being iterated over. </dd></dl>
509 </div>
510 </div><p>
511 <a class="anchor" name="5fb93de308fc7b989b26aeafe49b74f2"></a><!-- doxytag: member="Sylph::Array_base::itr" ref="5fb93de308fc7b989b26aeafe49b74f2" args="()" -->
512 <div class="memitem">
513 <div class="memproto">
514 <div class="memtemplate">
515 template&lt;class T&gt; </div>
516 <table class="memname">
517 <tr>
518 <td class="memname"><a class="el" href="class_sylph_1_1_sylph_iterator.html">Iterator</a> <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::itr </td>
519 <td>(</td>
520 <td class="paramname"> </td>
521 <td>&nbsp;)&nbsp;</td>
522 <td><code> [inline]</code></td>
523 </tr>
524 </table>
525 </div>
526 <div class="memdoc">
529  \ * Alias for <a class="el" href="class_sylph_1_1_array__base.html#5d40ad5a3a5cfa389ceccaf538bbeed3" title="\ * Get an instance of the Iterator for this class.">getIterator()</a> \ *.
531 <dl class="return" compact><dt><b>Returns:</b></dt><dd>An <a class="el" href="class_sylph_1_1_sylph_iterator.html" title="SylphIterator provides a easier-to-use wrapper around STL iterators.">SylphIterator</a> specific for the class being iterated over. </dd></dl>
533 </div>
534 </div><p>
535 <a class="anchor" name="abe400ebd4ec8f44437600053a236642"></a><!-- doxytag: member="Sylph::Array_base::mitr" ref="abe400ebd4ec8f44437600053a236642" args="()" -->
536 <div class="memitem">
537 <div class="memproto">
538 <div class="memtemplate">
539 template&lt;class T&gt; </div>
540 <table class="memname">
541 <tr>
542 <td class="memname"><a class="el" href="class_sylph_1_1_sylph_iterator.html">MutableIterator</a> <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::mitr </td>
543 <td>(</td>
544 <td class="paramname"> </td>
545 <td>&nbsp;)&nbsp;</td>
546 <td><code> [inline]</code></td>
547 </tr>
548 </table>
549 </div>
550 <div class="memdoc">
553  \ * Alias for <a class="el" href="class_sylph_1_1_array__base.html#b81bc1e841aee825025e01a091d099fa" title="\ * Get an instance of the MutableIterator for this class.">getMutableIterator()</a> \ *.
555 <dl class="return" compact><dt><b>Returns:</b></dt><dd>A mutable <a class="el" href="class_sylph_1_1_sylph_iterator.html" title="SylphIterator provides a easier-to-use wrapper around STL iterators.">SylphIterator</a> for the class being iterated over. </dd></dl>
557 </div>
558 </div><p>
559 <a class="anchor" name="83d93f791355c482ffabe7847df268eb"></a><!-- doxytag: member="Sylph::Array_base::operator=" ref="83d93f791355c482ffabe7847df268eb" args="(const Array_base&lt; T &gt; &amp;other)" -->
560 <div class="memitem">
561 <div class="memproto">
562 <div class="memtemplate">
563 template&lt;class T&gt; </div>
564 <table class="memname">
565 <tr>
566 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt;T&gt;&amp; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::operator= </td>
567 <td>(</td>
568 <td class="paramtype">const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt; T &gt; &amp;&nbsp;</td>
569 <td class="paramname"> <em>other</em> </td>
570 <td>&nbsp;)&nbsp;</td>
571 <td><code> [inline]</code></td>
572 </tr>
573 </table>
574 </div>
575 <div class="memdoc">
578 Swaps the data pointer of this <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> with the other <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a>.
580 The refcount for the current data pointer gets decreased by 1, the refcount for the data pointer of the other array gets increased by 1. In case the this Array'soriginal data pointer's refcount reaches zero, the original data will be deleted. <dl compact><dt><b>Parameters:</b></dt><dd>
581 <table border="0" cellspacing="2" cellpadding="0">
582 <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>The other array from which to use the data pointer </td></tr>
583 </table>
584 </dl>
586 </div>
587 </div><p>
588 <a class="anchor" name="8db59a5223c5c91bc38121f1cee728ac"></a><!-- doxytag: member="Sylph::Array_base::operator[]" ref="8db59a5223c5c91bc38121f1cee728ac" args="(const range &amp;ran) const " -->
589 <div class="memitem">
590 <div class="memproto">
591 <div class="memtemplate">
592 template&lt;class T&gt; </div>
593 <table class="memname">
594 <tr>
595 <td class="memname">const <a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt;T&gt; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::operator[] </td>
596 <td>(</td>
597 <td class="paramtype">const range &amp;&nbsp;</td>
598 <td class="paramname"> <em>ran</em> </td>
599 <td>&nbsp;)&nbsp;</td>
600 <td> const throw (<a class="el" href="class_sylph_1_1_exception.html">Exception</a>)<code> [inline]</code></td>
601 </tr>
602 </table>
603 </div>
604 <div class="memdoc">
607 Const-version of <a class="el" href="class_sylph_1_1_array__base.html#308283745b367bf50c03db6b184b48c9" title="Slices the array and returns the subarray.">operator[](const range &amp;)</a> .
609 <dl compact><dt><b>Parameters:</b></dt><dd>
610 <table border="0" cellspacing="2" cellpadding="0">
611 <tr><td valign="top"></td><td valign="top"><em>ran</em>&nbsp;</td><td>The range describing the slice </td></tr>
612 </table>
613 </dl>
614 <dl compact><dt><b>Exceptions:</b></dt><dd>
615 <table border="0" cellspacing="2" cellpadding="0">
616 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_sylph_1_1_array_exception.html" title="A generic Exception when an error occurs with an Array.">ArrayException</a></em>&nbsp;</td><td>if ran.last() &gt; length </td></tr>
617 </table>
618 </dl>
620 </div>
621 </div><p>
622 <a class="anchor" name="308283745b367bf50c03db6b184b48c9"></a><!-- doxytag: member="Sylph::Array_base::operator[]" ref="308283745b367bf50c03db6b184b48c9" args="(const range &amp;ran)" -->
623 <div class="memitem">
624 <div class="memproto">
625 <div class="memtemplate">
626 template&lt;class T&gt; </div>
627 <table class="memname">
628 <tr>
629 <td class="memname"><a class="el" href="class_sylph_1_1_array__base.html">Array_base</a>&lt;T&gt; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::operator[] </td>
630 <td>(</td>
631 <td class="paramtype">const range &amp;&nbsp;</td>
632 <td class="paramname"> <em>ran</em> </td>
633 <td>&nbsp;)&nbsp;</td>
634 <td> throw (<a class="el" href="class_sylph_1_1_exception.html">Exception</a>)<code> [inline]</code></td>
635 </tr>
636 </table>
637 </div>
638 <div class="memdoc">
641 Slices the array and returns the subarray.
643 E.g. : <pre><a class="el" href="class_sylph_1_1_array.html">Array&lt;String&gt;</a> subarr = myarr[range(5,8)]</pre> <code>subarr</code> now contains the values of <code>myarr</code>[5] to <code>myarr</code>[8] . Please note that the subarray contains a copy of the original. <dl compact><dt><b>Parameters:</b></dt><dd>
644 <table border="0" cellspacing="2" cellpadding="0">
645 <tr><td valign="top"></td><td valign="top"><em>ran</em>&nbsp;</td><td>The range describing the slice. </td></tr>
646 </table>
647 </dl>
648 <dl compact><dt><b>Exceptions:</b></dt><dd>
649 <table border="0" cellspacing="2" cellpadding="0">
650 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_sylph_1_1_array_exception.html" title="A generic Exception when an error occurs with an Array.">ArrayException</a></em>&nbsp;</td><td>if ran.last() &gt; length </td></tr>
651 </table>
652 </dl>
654 </div>
655 </div><p>
656 <a class="anchor" name="40145e7fb31875d72db1154fb2b2af85"></a><!-- doxytag: member="Sylph::Array_base::operator[]" ref="40145e7fb31875d72db1154fb2b2af85" args="(std::sidx_t idx) const " -->
657 <div class="memitem">
658 <div class="memproto">
659 <div class="memtemplate">
660 template&lt;class T&gt; </div>
661 <table class="memname">
662 <tr>
663 <td class="memname">const T&amp; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::operator[] </td>
664 <td>(</td>
665 <td class="paramtype">std::sidx_t&nbsp;</td>
666 <td class="paramname"> <em>idx</em> </td>
667 <td>&nbsp;)&nbsp;</td>
668 <td> const throw (<a class="el" href="class_sylph_1_1_exception.html">Exception</a>)<code> [inline]</code></td>
669 </tr>
670 </table>
671 </div>
672 <div class="memdoc">
675 This is the <code>const</code> version of T&amp; operator[] .
677 Its behaviour is identical to that of c-style const arrays, but throws an exception instead of overflowing or causing segfaults. <dl compact><dt><b>Parameters:</b></dt><dd>
678 <table border="0" cellspacing="2" cellpadding="0">
679 <tr><td valign="top"></td><td valign="top"><em>idx</em>&nbsp;</td><td>the index in the array from which to return an element </td></tr>
680 </table>
681 </dl>
682 <dl compact><dt><b>Exceptions:</b></dt><dd>
683 <table border="0" cellspacing="2" cellpadding="0">
684 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_sylph_1_1_array_exception.html" title="A generic Exception when an error occurs with an Array.">ArrayException</a></em>&nbsp;</td><td>if <code>idx &gt; length</code> </td></tr>
685 </table>
686 </dl>
688 </div>
689 </div><p>
690 <a class="anchor" name="3d34f036dbd0b5c4c00c9bb81cd5c074"></a><!-- doxytag: member="Sylph::Array_base::operator[]" ref="3d34f036dbd0b5c4c00c9bb81cd5c074" args="(std::sidx_t idx)" -->
691 <div class="memitem">
692 <div class="memproto">
693 <div class="memtemplate">
694 template&lt;class T&gt; </div>
695 <table class="memname">
696 <tr>
697 <td class="memname">T&amp; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::operator[] </td>
698 <td>(</td>
699 <td class="paramtype">std::sidx_t&nbsp;</td>
700 <td class="paramname"> <em>idx</em> </td>
701 <td>&nbsp;)&nbsp;</td>
702 <td> throw (<a class="el" href="class_sylph_1_1_exception.html">Exception</a>)<code> [inline]</code></td>
703 </tr>
704 </table>
705 </div>
706 <div class="memdoc">
709 Used for accessing the Array's contents.
711 Its behaviour is identical to that of c-style arrays, but throws an exception instead of overflowing or causing segfaults. <p>
712 The <a class="el" href="class_sylph_1_1_array.html" title="Array provides a safe array.">Array</a> will assume ownership over any pointers entered in this way. <dl compact><dt><b>Parameters:</b></dt><dd>
713 <table border="0" cellspacing="2" cellpadding="0">
714 <tr><td valign="top"></td><td valign="top"><em>idx</em>&nbsp;</td><td>the index in the array from which to return an element </td></tr>
715 </table>
716 </dl>
717 <dl compact><dt><b>Exceptions:</b></dt><dd>
718 <table border="0" cellspacing="2" cellpadding="0">
719 <tr><td valign="top"></td><td valign="top"><em><a class="el" href="class_sylph_1_1_array_exception.html" title="A generic Exception when an error occurs with an Array.">ArrayException</a></em>&nbsp;</td><td>if <code>idx &gt; length</code> </td></tr>
720 </table>
721 </dl>
723 </div>
724 </div><p>
725 <hr><h2>Member Data Documentation</h2>
726 <a class="anchor" name="b1c91dee8cfdaea416e97b4ef1884454"></a><!-- doxytag: member="Sylph::Array_base::length" ref="b1c91dee8cfdaea416e97b4ef1884454" args="" -->
727 <div class="memitem">
728 <div class="memproto">
729 <div class="memtemplate">
730 template&lt;class T&gt; </div>
731 <table class="memname">
732 <tr>
733 <td class="memname">const int&amp; <a class="el" href="class_sylph_1_1_array__base.html">Sylph::Array_base</a>&lt; T &gt;::<a class="el" href="class_sylph_1_1_array__base.html#b1c91dee8cfdaea416e97b4ef1884454">length</a> </td>
734 </tr>
735 </table>
736 </div>
737 <div class="memdoc">
740 The length of the array.
742 This variable is 1-based, while the array itself is 0-based, i.e. if length == N the highest entry in this array is N-1. E.g if array.length == 5, then the higest entry is array[4]
743 </div>
744 </div><p>
745 </div>
746 <hr size="1" class="unhidden"><address style="text-align: right;"><small>
747 Documentation for LibSylph generated by&nbsp;<a href="http://www.doxygen.org/index.html">Doxygen</a> 1.5.8</small></address>
748 </body>
749 </html>