Website Summary Files Commits Branches @commit @diff @stats
path: root / docs / html / classList.html
blob: 45d562294bb43e609e657eaca21003acb63a7a5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FMI Table: List&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FMI Table
   </div>
   <div id="projectbrief">| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classList-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">List&lt; T &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Templated class that stores an array of elements in dynamic memory.  
 <a href="classList.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="List_8hpp_source.html">List.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a93cd36efc12aa5ef5fc28866edce7e61"><td class="memItemLeft" align="right" valign="top"><a id="a93cd36efc12aa5ef5fc28866edce7e61" name="a93cd36efc12aa5ef5fc28866edce7e61"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>List</b> (const T *elements, unsigned elementsCount)</td></tr>
<tr class="memdesc:a93cd36efc12aa5ef5fc28866edce7e61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies all elements in given array. <br /></td></tr>
<tr class="separator:a93cd36efc12aa5ef5fc28866edce7e61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40212635a3d75dfc14e9473271467b04"><td class="memItemLeft" align="right" valign="top"><a id="a40212635a3d75dfc14e9473271467b04" name="a40212635a3d75dfc14e9473271467b04"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>List</b> (unsigned length)</td></tr>
<tr class="memdesc:a40212635a3d75dfc14e9473271467b04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory for the given length. <br /></td></tr>
<tr class="separator:a40212635a3d75dfc14e9473271467b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfec4f2e7990d06c143852ecfdf907bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#abfec4f2e7990d06c143852ecfdf907bb">add</a> (const T &amp;element)</td></tr>
<tr class="memdesc:abfec4f2e7990d06c143852ecfdf907bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an element.  <a href="classList.html#abfec4f2e7990d06c143852ecfdf907bb">More...</a><br /></td></tr>
<tr class="separator:abfec4f2e7990d06c143852ecfdf907bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4586debf72af33bccb3c2fbfce420e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#ae4586debf72af33bccb3c2fbfce420e8">insertAt</a> (const T &amp;element, unsigned index)</td></tr>
<tr class="memdesc:ae4586debf72af33bccb3c2fbfce420e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts element at given index.  <a href="classList.html#ae4586debf72af33bccb3c2fbfce420e8">More...</a><br /></td></tr>
<tr class="separator:ae4586debf72af33bccb3c2fbfce420e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9c0a5b5bca6286f458d6fab280de65a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#ad9c0a5b5bca6286f458d6fab280de65a">removeAt</a> (unsigned index)</td></tr>
<tr class="memdesc:ad9c0a5b5bca6286f458d6fab280de65a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes element at index.  <a href="classList.html#ad9c0a5b5bca6286f458d6fab280de65a">More...</a><br /></td></tr>
<tr class="separator:ad9c0a5b5bca6286f458d6fab280de65a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3804f03273ef5e339b504e439c5b6534"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#a3804f03273ef5e339b504e439c5b6534">findIndex</a> (const T &amp;element) const</td></tr>
<tr class="memdesc:a3804f03273ef5e339b504e439c5b6534"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the index of element.  <a href="classList.html#a3804f03273ef5e339b504e439c5b6534">More...</a><br /></td></tr>
<tr class="separator:a3804f03273ef5e339b504e439c5b6534"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a163a070c7d5dc77ca3c1726b8f2d4bc1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#a163a070c7d5dc77ca3c1726b8f2d4bc1">contain</a> (const T &amp;element) const</td></tr>
<tr class="separator:a163a070c7d5dc77ca3c1726b8f2d4bc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a321bb581943398344aad07198d1f02ac"><td class="memItemLeft" align="right" valign="top"><a id="a321bb581943398344aad07198d1f02ac" name="a321bb581943398344aad07198d1f02ac"></a>
T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (unsigned index)</td></tr>
<tr class="memdesc:a321bb581943398344aad07198d1f02ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns reference to element at index. <br /></td></tr>
<tr class="separator:a321bb581943398344aad07198d1f02ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fa582de3aec5094a871852b658cf853"><td class="memItemLeft" align="right" valign="top"><a id="a5fa582de3aec5094a871852b658cf853" name="a5fa582de3aec5094a871852b658cf853"></a>
const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (unsigned index) const</td></tr>
<tr class="memdesc:a5fa582de3aec5094a871852b658cf853"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns constant reference to element at index. <br /></td></tr>
<tr class="separator:a5fa582de3aec5094a871852b658cf853"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e380d73cf889304a7468762ade0410c"><td class="memItemLeft" align="right" valign="top"><a id="a1e380d73cf889304a7468762ade0410c" name="a1e380d73cf889304a7468762ade0410c"></a>
const T *&#160;</td><td class="memItemRight" valign="bottom"><b>raw_data</b> () const</td></tr>
<tr class="memdesc:a1e380d73cf889304a7468762ade0410c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns raw array of data. <br /></td></tr>
<tr class="separator:a1e380d73cf889304a7468762ade0410c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae296516a252e11963dbf963727ce429a"><td class="memItemLeft" align="right" valign="top"><a id="ae296516a252e11963dbf963727ce429a" name="ae296516a252e11963dbf963727ce429a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>clear</b> ()</td></tr>
<tr class="memdesc:ae296516a252e11963dbf963727ce429a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all data. <br /></td></tr>
<tr class="separator:ae296516a252e11963dbf963727ce429a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4332ce5a589da28528f035ded6d41e5"><td class="memItemLeft" align="right" valign="top"><a id="aa4332ce5a589da28528f035ded6d41e5" name="aa4332ce5a589da28528f035ded6d41e5"></a>
<a class="el" href="classList.html">List</a>&lt; T &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator+=</b> (const <a class="el" href="classList.html">List</a>&lt; T &gt; other)</td></tr>
<tr class="memdesc:aa4332ce5a589da28528f035ded6d41e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends elements from other list. <br /></td></tr>
<tr class="separator:aa4332ce5a589da28528f035ded6d41e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e3581ee07649f462aa8bb3221a5466e"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#a5e3581ee07649f462aa8bb3221a5466e">read</a> (std::istream &amp;istr)</td></tr>
<tr class="memdesc:a5e3581ee07649f462aa8bb3221a5466e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads from stream.  <a href="classList.html#a5e3581ee07649f462aa8bb3221a5466e">More...</a><br /></td></tr>
<tr class="separator:a5e3581ee07649f462aa8bb3221a5466e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d2babffd2fb4a5e0a40dbd306e19956"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#a8d2babffd2fb4a5e0a40dbd306e19956">write</a> (std::ostream &amp;ostr) const</td></tr>
<tr class="memdesc:a8d2babffd2fb4a5e0a40dbd306e19956"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes to stream.  <a href="classList.html#a8d2babffd2fb4a5e0a40dbd306e19956">More...</a><br /></td></tr>
<tr class="separator:a8d2babffd2fb4a5e0a40dbd306e19956"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa32109b77dccd8241b125ebabdda876c"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#aa32109b77dccd8241b125ebabdda876c">get_length</a> () const</td></tr>
<tr class="memdesc:aa32109b77dccd8241b125ebabdda876c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length.  <a href="classList.html#aa32109b77dccd8241b125ebabdda876c">More...</a><br /></td></tr>
<tr class="separator:aa32109b77dccd8241b125ebabdda876c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c1e3a3fc085f5b7ae68514c4758687b"><td class="memItemLeft" align="right" valign="top">unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classList.html#a3c1e3a3fc085f5b7ae68514c4758687b">get_count</a> () const</td></tr>
<tr class="memdesc:a3c1e3a3fc085f5b7ae68514c4758687b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the count.  <a href="classList.html#a3c1e3a3fc085f5b7ae68514c4758687b">More...</a><br /></td></tr>
<tr class="separator:a3c1e3a3fc085f5b7ae68514c4758687b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a248952759645a68a4a1ea5aa31bc089f"><td class="memItemLeft" align="right" valign="top"><a id="a248952759645a68a4a1ea5aa31bc089f" name="a248952759645a68a4a1ea5aa31bc089f"></a>
<a class="el" href="classList.html">List</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classList.html">List</a> &amp;other)</td></tr>
<tr class="separator:a248952759645a68a4a1ea5aa31bc089f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43ce719b9dcc8aa532bad580c44e99f6"><td class="memItemLeft" align="right" valign="top"><a id="a43ce719b9dcc8aa532bad580c44e99f6" name="a43ce719b9dcc8aa532bad580c44e99f6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>List</b> (const <a class="el" href="classList.html">List</a> &amp;other)</td></tr>
<tr class="separator:a43ce719b9dcc8aa532bad580c44e99f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25feb644d97345e4f36bf54c7aab4ade"><td class="memItemLeft" align="right" valign="top"><a id="a25feb644d97345e4f36bf54c7aab4ade" name="a25feb644d97345e4f36bf54c7aab4ade"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>List</b> (<a class="el" href="classList.html">List</a> &amp;&amp;other)</td></tr>
<tr class="separator:a25feb644d97345e4f36bf54c7aab4ade"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3be35847f78c9fdb37c957eff55c1608"><td class="memItemLeft" align="right" valign="top"><a id="a3be35847f78c9fdb37c957eff55c1608" name="a3be35847f78c9fdb37c957eff55c1608"></a>
<a class="el" href="classList.html">List</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classList.html">List</a> &amp;&amp;other)</td></tr>
<tr class="separator:a3be35847f78c9fdb37c957eff55c1608"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a302d78384a6516a4d4dede84d4f0968e"><td class="memItemLeft" align="right" valign="top"><a id="a302d78384a6516a4d4dede84d4f0968e" name="a302d78384a6516a4d4dede84d4f0968e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>resize</b> ()</td></tr>
<tr class="separator:a302d78384a6516a4d4dede84d4f0968e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29cb6681b3f5514f747d04661b08cfd6"><td class="memItemLeft" align="right" valign="top"><a id="a29cb6681b3f5514f747d04661b08cfd6" name="a29cb6681b3f5514f747d04661b08cfd6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>free</b> ()</td></tr>
<tr class="separator:a29cb6681b3f5514f747d04661b08cfd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef2dcec4a271f7ba2f71ef164535e273"><td class="memItemLeft" align="right" valign="top"><a id="aef2dcec4a271f7ba2f71ef164535e273" name="aef2dcec4a271f7ba2f71ef164535e273"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>copyFrom</b> (const <a class="el" href="classList.html">List</a> &amp;other)</td></tr>
<tr class="separator:aef2dcec4a271f7ba2f71ef164535e273"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ab28a0d67da45b5d3bb755c72105a516c"><td class="memItemLeft" align="right" valign="top"><a id="ab28a0d67da45b5d3bb755c72105a516c" name="ab28a0d67da45b5d3bb755c72105a516c"></a>
T *&#160;</td><td class="memItemRight" valign="bottom"><b>elements</b></td></tr>
<tr class="separator:ab28a0d67da45b5d3bb755c72105a516c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af44323f3a486341510ad97b6bceda1be"><td class="memItemLeft" align="right" valign="top"><a id="af44323f3a486341510ad97b6bceda1be" name="af44323f3a486341510ad97b6bceda1be"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>length</b></td></tr>
<tr class="separator:af44323f3a486341510ad97b6bceda1be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66db5f1795dd0530911f32552ddd9815"><td class="memItemLeft" align="right" valign="top"><a id="a66db5f1795dd0530911f32552ddd9815" name="a66db5f1795dd0530911f32552ddd9815"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><b>count</b></td></tr>
<tr class="separator:a66db5f1795dd0530911f32552ddd9815"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename T&gt;<br />
class List&lt; T &gt;</div><p >Templated class that stores an array of elements in dynamic memory. </p>
<dl class="section warning"><dt>Warning</dt><dd><a class="el" href="classList.html#a3804f03273ef5e339b504e439c5b6534" title="Finds the index of element.">findIndex()</a>, <a class="el" href="classList.html#a163a070c7d5dc77ca3c1726b8f2d4bc1">contain()</a>, <a class="el" href="classList.html#a5e3581ee07649f462aa8bb3221a5466e" title="Reads from stream.">read()</a>, <a class="el" href="classList.html#a8d2babffd2fb4a5e0a40dbd306e19956" title="Writes to stream.">write()</a>, operator&lt;&lt;() and operator&gt;&gt;() require the type to have defined a couple of functions. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classList.html#a3804f03273ef5e339b504e439c5b6534" title="Finds the index of element.">findIndex()</a> </dd>
<dd>
<a class="el" href="classList.html#a163a070c7d5dc77ca3c1726b8f2d4bc1">contain()</a> </dd>
<dd>
<a class="el" href="classList.html#a5e3581ee07649f462aa8bb3221a5466e" title="Reads from stream.">read()</a> </dd>
<dd>
<a class="el" href="classList.html#a8d2babffd2fb4a5e0a40dbd306e19956" title="Writes to stream.">write()</a> </dd>
<dd>
<a class="el" href="List_8hpp.html#ac8590f4d4ba6c820c34afe14df54f2c2" title="Writes List to stream with &lt;&lt; operator.">operator&lt;&lt;()</a> </dd>
<dd>
<a class="el" href="List_8hpp.html#a7469c3479753bfbada761697c539aa07" title="Reads List from stream with &gt;&gt; operator.">operator&gt;&gt;()</a> </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="abfec4f2e7990d06c143852ecfdf907bb" name="abfec4f2e7990d06c143852ecfdf907bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfec4f2e7990d06c143852ecfdf907bb">&#9670;&nbsp;</a></span>add()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classList.html">List</a>&lt; T &gt;::add </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds an element. </p>
<p >Resizes internal array if there is no space for additional elements. </p>

</div>
</div>
<a id="a163a070c7d5dc77ca3c1726b8f2d4bc1" name="a163a070c7d5dc77ca3c1726b8f2d4bc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a163a070c7d5dc77ca3c1726b8f2d4bc1">&#9670;&nbsp;</a></span>contain()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classList.html">List</a>&lt; T &gt;::contain </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>Whether the element is contained in the current <a class="el" href="classList.html" title="Templated class that stores an array of elements in dynamic memory.">List</a></dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Function depends on <a class="el" href="classList.html#a3804f03273ef5e339b504e439c5b6534" title="Finds the index of element.">findIndex()</a>, which means the same "compare" function must be defined in the type </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classList.html#a3804f03273ef5e339b504e439c5b6534" title="Finds the index of element.">findIndex()</a> </dd></dl>

</div>
</div>
<a id="a3804f03273ef5e339b504e439c5b6534" name="a3804f03273ef5e339b504e439c5b6534"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3804f03273ef5e339b504e439c5b6534">&#9670;&nbsp;</a></span>findIndex()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">unsigned <a class="el" href="classList.html">List</a>&lt; T &gt;::findIndex </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>element</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the index of element. </p>
<dl class="section return"><dt>Returns</dt><dd>Index of element. If element isn't found, returns the count of element.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The function depends on the type having a function "compare" defined, which takes two elements and returns a number &lt;0 if elem1 &lt; elem2, &gt;0 if elem1 &gt; elem2, 0 if elem1 == elem2 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Searching is done linearly </dd></dl>

</div>
</div>
<a id="a3c1e3a3fc085f5b7ae68514c4758687b" name="a3c1e3a3fc085f5b7ae68514c4758687b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c1e3a3fc085f5b7ae68514c4758687b">&#9670;&nbsp;</a></span>get_count()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">unsigned <a class="el" href="classList.html">List</a>&lt; T &gt;::get_count</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the count. </p>
<p >Count is the amount of elements that are stored. </p>

</div>
</div>
<a id="aa32109b77dccd8241b125ebabdda876c" name="aa32109b77dccd8241b125ebabdda876c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa32109b77dccd8241b125ebabdda876c">&#9670;&nbsp;</a></span>get_length()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">unsigned <a class="el" href="classList.html">List</a>&lt; T &gt;::get_length</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the length. </p>
<p >Length is the size of the underlying array (allocated memory). </p>

</div>
</div>
<a id="ae4586debf72af33bccb3c2fbfce420e8" name="ae4586debf72af33bccb3c2fbfce420e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4586debf72af33bccb3c2fbfce420e8">&#9670;&nbsp;</a></span>insertAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classList.html">List</a>&lt; T &gt;::insertAt </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&#160;</td>
          <td class="paramname"><em>element</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts element at given index. </p>
<p >If index is after the last element, the element is just added. Otherwise all elements after the index are shifted right and element is put in place.</p>
<p >Resizes internal array if there is no space for additional elements. </p>

</div>
</div>
<a id="a5e3581ee07649f462aa8bb3221a5466e" name="a5e3581ee07649f462aa8bb3221a5466e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e3581ee07649f462aa8bb3221a5466e">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::istream &amp; <a class="el" href="classList.html">List</a>&lt; T &gt;::read </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>istr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads from stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">istr</td><td>An input stream</td></tr>
  </table>
  </dd>
</dl>
<p>Directly reads bytes from stream (calls <a class="el" href="classList.html#a5e3581ee07649f462aa8bb3221a5466e" title="Reads from stream.">read()</a> function). Any stored values are deleted and replaced with those from the stream.</p>
<dl class="section warning"><dt>Warning</dt><dd>The function depends on the type having a function "read" defined, which takes an std::istream&amp; and writes it's data to it. Return type doesn't matter. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Doesn't alter the stream in any other way. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Best used with binary ifstream </dd></dl>

</div>
</div>
<a id="ad9c0a5b5bca6286f458d6fab280de65a" name="ad9c0a5b5bca6286f458d6fab280de65a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9c0a5b5bca6286f458d6fab280de65a">&#9670;&nbsp;</a></span>removeAt()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classList.html">List</a>&lt; T &gt;::removeAt </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes element at index. </p>
<dl class="section return"><dt>Returns</dt><dd>Wether element could be removed</dd></dl>
<p>If index is after that of the last element, nothing is done and false is returned. Otherwise elements after index are shifted right and count is reduced. </p>

</div>
</div>
<a id="a8d2babffd2fb4a5e0a40dbd306e19956" name="a8d2babffd2fb4a5e0a40dbd306e19956"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d2babffd2fb4a5e0a40dbd306e19956">&#9670;&nbsp;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; <a class="el" href="classList.html">List</a>&lt; T &gt;::write </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>ostr</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes to stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ostr</td><td>An output stream</td></tr>
  </table>
  </dd>
</dl>
<p>Directly writes bytes to stream (calls <a class="el" href="classList.html#a8d2babffd2fb4a5e0a40dbd306e19956" title="Writes to stream.">write()</a> function).</p>
<dl class="section warning"><dt>Warning</dt><dd>The function depends on the type having a function "write" defined, which takes an std::ostream&amp; and writes it's data to it. Return type doesn't matter. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Doesn't alter the stream in any other way. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Best used with binary ofstream </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/Generic/List/<a class="el" href="List_8hpp_source.html">List.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>