File: classwx_scoped_array.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (447 lines) | stat: -rw-r--r-- 26,346 bytes parent folder | download | duplicates (2)
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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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=9"/>
<title>wxWidgets: wxScopedArray&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="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classwx_scoped_array-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxScopedArray&lt; T &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__group__class__smartpointers.html">Smart Pointers</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/scopedarray.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br/>
class wxScopedArray&lt; T &gt;</h3>

<p>A scoped array template class. </p>
<p>This is a simple scoped smart pointer array implementation that is similar to the Boost smart pointers (see <a href="http://www.boost.org/">http://www.boost.org/</a>) but rewritten to use macros instead.</p>
<p>This class is similar to boost scoped_array class: <a href="http://www.boost.org/doc/libs/1_37_0/libs/smart_ptr/scoped_array.htm">http://www.boost.org/doc/libs/1_37_0/libs/smart_ptr/scoped_array.htm</a></p>
<p>Notice that objects of this class intentionally cannot be copied.</p>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__smartpointers.html">Smart Pointers</a></span></div><p><b>Example:</b> </p>
<p>Below is an example of using a wxWidgets scoped smart pointer and pointer array.</p>
<div class="fragment"><div class="line"><span class="keyword">class </span>MyClass { ... };</div>
<div class="line"></div>
<div class="line"><span class="comment">// declare a smart pointer to a MyClass called wxMyClassPtr</span></div>
<div class="line">wxDECLARE_SCOPED_PTR(MyClass, wxMyClassPtr)</div>
<div class="line"><span class="comment">// declare a smart pointer to an array of chars</span></div>
<div class="line">wxDECLARE_SCOPED_ARRAY(<span class="keywordtype">char</span>, wxCharArray)</div>
<div class="line"></div>
<div class="line">...</div>
<div class="line"></div>
<div class="line"><span class="comment">// define the first pointer class, must be complete</span></div>
<div class="line">wxDEFINE_SCOPED_PTR(MyClass, wxMyClassPtr)</div>
<div class="line"><span class="comment">// define the second pointer class</span></div>
<div class="line">wxDEFINE_SCOPED_ARRAY(<span class="keywordtype">char</span>, wxCharArray)</div>
<div class="line"></div>
<div class="line"><span class="comment">// create an object with a new pointer to MyClass</span></div>
<div class="line">wxMyClassPtr theObj(new MyClass());</div>
<div class="line"><span class="comment">// reset the pointer (deletes the previous one)</span></div>
<div class="line">theObj.<a class="code" href="classwx_scoped_array.html#a2fda76162f6d263438e9b274d2f7b81b" title="Deletes the currently held pointer and sets it to &#39;p&#39; or to NULL if no arguments are specified...">reset</a>(new MyClass());</div>
<div class="line"></div>
<div class="line"><span class="comment">// access the pointer</span></div>
<div class="line">theObj-&gt;MyFunc();</div>
<div class="line"></div>
<div class="line"><span class="comment">// create an object with a new array of chars</span></div>
<div class="line">wxCharArray theCharObj(new <span class="keywordtype">char</span>[100]);</div>
<div class="line"></div>
<div class="line"><span class="comment">// access the array</span></div>
<div class="line">theCharObj[0] = &quot;!&quot;;</div>
</div><!-- fragment --><p><b>Declaring new smart pointer types:</b> </p>
<div class="fragment"><div class="line">wxDECLAR_SCOPED_ARRAY( TYPE,        <span class="comment">// type of the values</span></div>
<div class="line">                       CLASSNAME ); <span class="comment">// name of the class</span></div>
</div><!-- fragment --><p>A smart pointer holds a pointer to an object (which must be complete when wxDEFINE_SCOPED_ARRAY() is called).</p>
<p>The memory used by the object is deleted when the smart pointer goes out of scope. The first argument of the macro is the pointer type, the second is the name of the new smart pointer class being created. Below we will use <a class="el" href="classwx_scoped_array.html" title="A scoped array template class.">wxScopedArray</a> to represent the scoped pointer array class, but the user may create the class with any legal name.</p>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__smartpointers.html">Smart Pointers</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_scoped_ptr.html" title="This is a simple scoped smart pointer implementation that is similar to the Boost smart pointers (see...">wxScopedPtr</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ac28509dec72c7d4c56bd1123ffafc80e"><td class="memItemLeft" align="right" valign="top">typedef T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#ac28509dec72c7d4c56bd1123ffafc80e">element_type</a></td></tr>
<tr class="memdesc:ac28509dec72c7d4c56bd1123ffafc80e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of the array elements.  <a href="#ac28509dec72c7d4c56bd1123ffafc80e"></a><br/></td></tr>
<tr class="separator:ac28509dec72c7d4c56bd1123ffafc80e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aae9a7af43d30a2ed88ad081726ad3bbd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#aae9a7af43d30a2ed88ad081726ad3bbd">wxScopedArray</a> (type *T=NULL)</td></tr>
<tr class="memdesc:aae9a7af43d30a2ed88ad081726ad3bbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the smart pointer with the given pointer or none if <span class="literal">NULL</span>.  <a href="#aae9a7af43d30a2ed88ad081726ad3bbd"></a><br/></td></tr>
<tr class="separator:aae9a7af43d30a2ed88ad081726ad3bbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaba2436381ab2e5f8475012549d86db4"><td class="memItemLeft" align="right" valign="top">const T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#aaba2436381ab2e5f8475012549d86db4">get</a> ()</td></tr>
<tr class="memdesc:aaba2436381ab2e5f8475012549d86db4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This operator gets the pointer stored in the smart pointer or returns <span class="literal">NULL</span> if there is none.  <a href="#aaba2436381ab2e5f8475012549d86db4"></a><br/></td></tr>
<tr class="separator:aaba2436381ab2e5f8475012549d86db4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8952ef9694da124e40130363038d4b3d"><td class="memItemLeft" align="right" valign="top">const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a8952ef9694da124e40130363038d4b3d">operator[]</a> (long int i)</td></tr>
<tr class="memdesc:a8952ef9694da124e40130363038d4b3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This operator acts like the standard [] indexing operator for C++ arrays.  <a href="#a8952ef9694da124e40130363038d4b3d"></a><br/></td></tr>
<tr class="separator:a8952ef9694da124e40130363038d4b3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fda76162f6d263438e9b274d2f7b81b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a2fda76162f6d263438e9b274d2f7b81b">reset</a> (T *p=NULL)</td></tr>
<tr class="memdesc:a2fda76162f6d263438e9b274d2f7b81b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes the currently held pointer and sets it to 'p' or to <span class="literal">NULL</span> if no arguments are specified.  <a href="#a2fda76162f6d263438e9b274d2f7b81b"></a><br/></td></tr>
<tr class="separator:a2fda76162f6d263438e9b274d2f7b81b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c2383aef679994454f4cd5f4faf8ad3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a1c2383aef679994454f4cd5f4faf8ad3">swap</a> (<a class="el" href="classwx_scoped_array.html">wxScopedArray</a> &amp;ot)</td></tr>
<tr class="memdesc:a1c2383aef679994454f4cd5f4faf8ad3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the pointer inside the smart pointer with <em>ot</em>.  <a href="#a1c2383aef679994454f4cd5f4faf8ad3"></a><br/></td></tr>
<tr class="separator:a1c2383aef679994454f4cd5f4faf8ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ccb5c555051a3455903bc70d62e34e7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a0ccb5c555051a3455903bc70d62e34e7">wxScopedArray</a> (T *array=NULL)</td></tr>
<tr class="memdesc:a0ccb5c555051a3455903bc70d62e34e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor takes ownership of the given array.  <a href="#a0ccb5c555051a3455903bc70d62e34e7"></a><br/></td></tr>
<tr class="separator:a0ccb5c555051a3455903bc70d62e34e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1290af2f1e951056cdc33770584b11a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#ab1290af2f1e951056cdc33770584b11a">~wxScopedArray</a> ()</td></tr>
<tr class="memdesc:ab1290af2f1e951056cdc33770584b11a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor destroy the array.  <a href="#ab1290af2f1e951056cdc33770584b11a"></a><br/></td></tr>
<tr class="separator:ab1290af2f1e951056cdc33770584b11a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af451c2674e5a8d2bcc97dbf0795f7b12"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#af451c2674e5a8d2bcc97dbf0795f7b12">operator unspecified_bool_type</a> () const </td></tr>
<tr class="memdesc:af451c2674e5a8d2bcc97dbf0795f7b12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Conversion to a boolean expression (in a variant which is not convertible to anything but a boolean expression).  <a href="#af451c2674e5a8d2bcc97dbf0795f7b12"></a><br/></td></tr>
<tr class="separator:af451c2674e5a8d2bcc97dbf0795f7b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a877c6b3f10236aa6ce0e273d93cdf910"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a877c6b3f10236aa6ce0e273d93cdf910">reset</a> (T *array=NULL)</td></tr>
<tr class="memdesc:a877c6b3f10236aa6ce0e273d93cdf910"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the array pointer stored.  <a href="#a877c6b3f10236aa6ce0e273d93cdf910"></a><br/></td></tr>
<tr class="separator:a877c6b3f10236aa6ce0e273d93cdf910"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a315ad6a56187a5a90c5d71c4dfd94d25"><td class="memItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a315ad6a56187a5a90c5d71c4dfd94d25">operator[]</a> (size_t n) const </td></tr>
<tr class="memdesc:a315ad6a56187a5a90c5d71c4dfd94d25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the n-th element of the array.  <a href="#a315ad6a56187a5a90c5d71c4dfd94d25"></a><br/></td></tr>
<tr class="separator:a315ad6a56187a5a90c5d71c4dfd94d25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d2097f0ae3410f5eb5afcc2e08c1b9b"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#a4d2097f0ae3410f5eb5afcc2e08c1b9b">get</a> () const </td></tr>
<tr class="memdesc:a4d2097f0ae3410f5eb5afcc2e08c1b9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the array pointer.  <a href="#a4d2097f0ae3410f5eb5afcc2e08c1b9b"></a><br/></td></tr>
<tr class="separator:a4d2097f0ae3410f5eb5afcc2e08c1b9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7f6ea16c7b21dcd2d53f5c3048f1061"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_scoped_array.html#ac7f6ea16c7b21dcd2d53f5c3048f1061">swap</a> (<a class="el" href="classwx_scoped_array.html">wxScopedArray</a> &amp;other)</td></tr>
<tr class="memdesc:ac7f6ea16c7b21dcd2d53f5c3048f1061"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps the contents of this array with another one.  <a href="#ac7f6ea16c7b21dcd2d53f5c3048f1061"></a><br/></td></tr>
<tr class="separator:ac7f6ea16c7b21dcd2d53f5c3048f1061"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="ac28509dec72c7d4c56bd1123ffafc80e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef T <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::<a class="el" href="classwx_scoped_array.html#ac28509dec72c7d4c56bd1123ffafc80e">element_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The type of the array elements. </p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aae9a7af43d30a2ed88ad081726ad3bbd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::<a class="el" href="classwx_scoped_array.html">wxScopedArray</a> </td>
          <td>(</td>
          <td class="paramtype">type *&#160;</td>
          <td class="paramname"><em>T</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates the smart pointer with the given pointer or none if <span class="literal">NULL</span>. </p>
<p>On compilers that support it, this uses the explicit keyword. </p>

</div>
</div>
<a class="anchor" id="a0ccb5c555051a3455903bc70d62e34e7"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::<a class="el" href="classwx_scoped_array.html">wxScopedArray</a> </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>array</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor takes ownership of the given array. </p>
<p>If <em>array</em> is <span class="literal">NULL</span>, <a class="el" href="classwx_scoped_array.html#a2fda76162f6d263438e9b274d2f7b81b" title="Deletes the currently held pointer and sets it to &#39;p&#39; or to NULL if no arguments are specified...">reset()</a> must presumably be called later.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>An array allocated using <code>new</code>[] or <span class="literal">NULL</span>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab1290af2f1e951056cdc33770584b11a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::~<a class="el" href="classwx_scoped_array.html">wxScopedArray</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor destroy the array. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aaba2436381ab2e5f8475012549d86db4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const T* <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This operator gets the pointer stored in the smart pointer or returns <span class="literal">NULL</span> if there is none. </p>

</div>
</div>
<a class="anchor" id="a4d2097f0ae3410f5eb5afcc2e08c1b9b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the array pointer. </p>
<p>The returned pointer may be <span class="literal">NULL</span>. It must not be deleted by the caller, call <code>reset(NULL)</code> instead. </p>

</div>
</div>
<a class="anchor" id="af451c2674e5a8d2bcc97dbf0795f7b12"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::operator unspecified_bool_type </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Conversion to a boolean expression (in a variant which is not convertible to anything but a boolean expression). </p>
<p>If this class contains a valid array it will return <span class="literal">true</span>, if it contains a <span class="literal">NULL</span> pointer it will return <span class="literal">false</span>. </p>

</div>
</div>
<a class="anchor" id="a8952ef9694da124e40130363038d4b3d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const T&amp; <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::operator[] </td>
          <td>(</td>
          <td class="paramtype">long int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This operator acts like the standard [] indexing operator for C++ arrays. </p>
<p>The function does not do bounds checking. </p>

</div>
</div>
<a class="anchor" id="a315ad6a56187a5a90c5d71c4dfd94d25"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::operator[] </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the n-th element of the array. </p>
<p>Must not be called if the array has no valid pointer. </p>

</div>
</div>
<a class="anchor" id="a2fda76162f6d263438e9b274d2f7b81b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::reset </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>p</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deletes the currently held pointer and sets it to 'p' or to <span class="literal">NULL</span> if no arguments are specified. </p>
<p>This function does check to make sure that the pointer you are assigning is not the same pointer that is already stored. </p>

</div>
</div>
<a class="anchor" id="a877c6b3f10236aa6ce0e273d93cdf910"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::reset </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>array</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the array pointer stored. </p>
<p>The previously stored array is deleted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td>An array allocated using <code>new</code>[] or <span class="literal">NULL</span>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1c2383aef679994454f4cd5f4faf8ad3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>ot</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swap the pointer inside the smart pointer with <em>ot</em>. </p>
<p>The pointer being swapped must be of the same type (hence the same class name). </p>

</div>
</div>
<a class="anchor" id="ac7f6ea16c7b21dcd2d53f5c3048f1061"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt;::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_scoped_array.html">wxScopedArray</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swaps the contents of this array with another one. </p>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:56 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>