File: group__group__funcmacro__rtti.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 (787 lines) | stat: -rw-r--r-- 55,340 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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
<!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: Runtime Type Information (RTTI)</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><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Runtime Type Information (RTTI)</div>  </div>
<div class="ingroups"><a class="el" href="group__group__funcmacro.html">Functions and Macros by Category</a></div></div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>wxWidgets uses its own RTTI ("run-time type identification") system which predates the current standard C++ RTTI and so is kept for backwards compatibility reasons but also because it allows some things which the standard RTTI doesn't directly support (such as creating a class from its name). </p>
<p>The standard C++ RTTI can be used in the user code without any problems and in general you shouldn't need to use the functions and the macros in this section unless you are thinking of modifying or adding any wxWidgets classes.</p>
<p>Related Overviews: <a class="el" href="overview_rtti.html">Runtime Type Information (RTTI)</a></p>
<p>Related class group: <a class="el" href="group__group__class__rtti.html">Runtime Type Information (RTTI)</a> </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga1523a2d553dea288d66cd35e8a0ffd5c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga1523a2d553dea288d66cd35e8a0ffd5c">wxDECLARE_APP</a>(className)</td></tr>
<tr class="memdesc:ga1523a2d553dea288d66cd35e8a0ffd5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is used in headers to create a forward declaration of the <a class="el" href="group__group__funcmacro__appinitterm.html#gac387a69e740a149f9888e4992a3a4c6c" title="This function doesn&#39;t exist in wxWidgets but it is created by using the wxIMPLEMENT_APP() macro...">wxGetApp()</a> function implemented by <a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP()</a>.  <a href="#ga1523a2d553dea288d66cd35e8a0ffd5c"></a><br/></td></tr>
<tr class="separator:ga1523a2d553dea288d66cd35e8a0ffd5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga967aafaa261481fe2d2e1cf599e3e003"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003">wxIMPLEMENT_APP</a>(className)</td></tr>
<tr class="memdesc:ga967aafaa261481fe2d2e1cf599e3e003"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is used in the application class implementation file to make the application class known to wxWidgets for dynamic construction.  <a href="#ga967aafaa261481fe2d2e1cf599e3e003"></a><br/></td></tr>
<tr class="separator:ga967aafaa261481fe2d2e1cf599e3e003"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacee897a7d4e704e1aa53568220f2396e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gacee897a7d4e704e1aa53568220f2396e">wxCLASSINFO</a>(className)</td></tr>
<tr class="memdesc:gacee897a7d4e704e1aa53568220f2396e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the <a class="el" href="classwx_class_info.html" title="This class stores meta-information about classes.">wxClassInfo</a> object associated with this class.  <a href="#gacee897a7d4e704e1aa53568220f2396e"></a><br/></td></tr>
<tr class="separator:gacee897a7d4e704e1aa53568220f2396e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5bbb5821d56ac801da838c42105b72ae"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga5bbb5821d56ac801da838c42105b72ae">wxDECLARE_ABSTRACT_CLASS</a>(className)</td></tr>
<tr class="memdesc:ga5bbb5821d56ac801da838c42105b72ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically.  <a href="#ga5bbb5821d56ac801da838c42105b72ae"></a><br/></td></tr>
<tr class="separator:ga5bbb5821d56ac801da838c42105b72ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c252d076397bec5ac241272a7a60747"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga9c252d076397bec5ac241272a7a60747">wxDECLARE_DYNAMIC_CLASS</a>(className)</td></tr>
<tr class="memdesc:ga9c252d076397bec5ac241272a7a60747"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare that the objects of this class should be dynamically creatable from run-time type information.  <a href="#ga9c252d076397bec5ac241272a7a60747"></a><br/></td></tr>
<tr class="separator:ga9c252d076397bec5ac241272a7a60747"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20465fc7e022e29a5dacfad46e152e75"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga20465fc7e022e29a5dacfad46e152e75">wxDECLARE_CLASS</a>(className)</td></tr>
<tr class="memdesc:ga20465fc7e022e29a5dacfad46e152e75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically.  <a href="#ga20465fc7e022e29a5dacfad46e152e75"></a><br/></td></tr>
<tr class="separator:ga20465fc7e022e29a5dacfad46e152e75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f58f4ea4376a2e3994a9e6880509027"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga2f58f4ea4376a2e3994a9e6880509027">wxIMPLEMENT_ABSTRACT_CLASS</a>(className, baseClassName)</td></tr>
<tr class="memdesc:ga2f58f4ea4376a2e3994a9e6880509027"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information.  <a href="#ga2f58f4ea4376a2e3994a9e6880509027"></a><br/></td></tr>
<tr class="separator:ga2f58f4ea4376a2e3994a9e6880509027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55f899b6146d26aa5a75a22984fa1895"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga55f899b6146d26aa5a75a22984fa1895">wxIMPLEMENT_ABSTRACT_CLASS2</a>(className, baseClassName1, baseClassName2)</td></tr>
<tr class="memdesc:ga55f899b6146d26aa5a75a22984fa1895"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes.  <a href="#ga55f899b6146d26aa5a75a22984fa1895"></a><br/></td></tr>
<tr class="separator:ga55f899b6146d26aa5a75a22984fa1895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cbf0c21eb5986eb489dc67450eab1d1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga4cbf0c21eb5986eb489dc67450eab1d1">wxIMPLEMENT_DYNAMIC_CLASS</a>(className, baseClassName)</td></tr>
<tr class="memdesc:ga4cbf0c21eb5986eb489dc67450eab1d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically.  <a href="#ga4cbf0c21eb5986eb489dc67450eab1d1"></a><br/></td></tr>
<tr class="separator:ga4cbf0c21eb5986eb489dc67450eab1d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga239f80b143bae2085a271fea0b5ed9db"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga239f80b143bae2085a271fea0b5ed9db">wxIMPLEMENT_DYNAMIC_CLASS2</a>(className, baseClassName1, baseClassName2)</td></tr>
<tr class="memdesc:ga239f80b143bae2085a271fea0b5ed9db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically.  <a href="#ga239f80b143bae2085a271fea0b5ed9db"></a><br/></td></tr>
<tr class="separator:ga239f80b143bae2085a271fea0b5ed9db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf2d0caedeccc20619218809d4a2a7604"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gaf2d0caedeccc20619218809d4a2a7604">wxIMPLEMENT_CLASS</a>(className, baseClassName)</td></tr>
<tr class="memdesc:gaf2d0caedeccc20619218809d4a2a7604"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically.  <a href="#gaf2d0caedeccc20619218809d4a2a7604"></a><br/></td></tr>
<tr class="separator:gaf2d0caedeccc20619218809d4a2a7604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf644ef7f6fe628bc447141936f675332"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gaf644ef7f6fe628bc447141936f675332">wxIMPLEMENT_CLASS2</a>(className, baseClassName1, baseClassName2)</td></tr>
<tr class="memdesc:gaf644ef7f6fe628bc447141936f675332"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes, and whose instances can be created dynamically.  <a href="#gaf644ef7f6fe628bc447141936f675332"></a><br/></td></tr>
<tr class="separator:gaf644ef7f6fe628bc447141936f675332"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae268e701d1e2aed8539c6003f775dd73"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gae268e701d1e2aed8539c6003f775dd73">wx_const_cast</a>(T, x)</td></tr>
<tr class="memdesc:gae268e701d1e2aed8539c6003f775dd73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <code>const_cast&lt;T&gt;(x)</code> if the compiler supports const cast or <code></code>(T)x for old compilers.  <a href="#gae268e701d1e2aed8539c6003f775dd73"></a><br/></td></tr>
<tr class="separator:gae268e701d1e2aed8539c6003f775dd73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42cdce9f5bc6dbe6a846a47e9e841e4f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga42cdce9f5bc6dbe6a846a47e9e841e4f">wx_reinterpret_cast</a>(T, x)</td></tr>
<tr class="memdesc:ga42cdce9f5bc6dbe6a846a47e9e841e4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <code>reinterpret_cast&lt;T&gt;(x)</code> if the compiler supports reinterpret cast or <code></code>(T)x for old compilers.  <a href="#ga42cdce9f5bc6dbe6a846a47e9e841e4f"></a><br/></td></tr>
<tr class="separator:ga42cdce9f5bc6dbe6a846a47e9e841e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3a4a52303d4a1fa3d3346e762638c64"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gaa3a4a52303d4a1fa3d3346e762638c64">wx_static_cast</a>(T, x)</td></tr>
<tr class="memdesc:gaa3a4a52303d4a1fa3d3346e762638c64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <code>static_cast&lt;T&gt;(x)</code> if the compiler supports static cast or <code></code>(T)x for old compilers.  <a href="#gaa3a4a52303d4a1fa3d3346e762638c64"></a><br/></td></tr>
<tr class="separator:gaa3a4a52303d4a1fa3d3346e762638c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga092df8a3ee35e20a4c2c7d0b6132592a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga092df8a3ee35e20a4c2c7d0b6132592a">wx_truncate_cast</a>(T, x)</td></tr>
<tr class="memdesc:ga092df8a3ee35e20a4c2c7d0b6132592a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This case doesn’t correspond to any standard cast but exists solely to make casts which possibly result in a truncation of an integer value more readable.  <a href="#ga092df8a3ee35e20a4c2c7d0b6132592a"></a><br/></td></tr>
<tr class="separator:ga092df8a3ee35e20a4c2c7d0b6132592a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga47026a9dcf1318d6934c1e8091f3433e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga47026a9dcf1318d6934c1e8091f3433e">wxConstCast</a>(ptr, classname)</td></tr>
<tr class="memdesc:ga47026a9dcf1318d6934c1e8091f3433e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro expands into <code>const_cast&lt;classname *&gt;(ptr)</code> if the compiler supports const_cast or into an old, C-style cast, otherwise.  <a href="#ga47026a9dcf1318d6934c1e8091f3433e"></a><br/></td></tr>
<tr class="separator:ga47026a9dcf1318d6934c1e8091f3433e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2606f92f8d5f8e22f4afb44a6df3c38a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a">wxDynamicCast</a>(ptr, classname)</td></tr>
<tr class="memdesc:ga2606f92f8d5f8e22f4afb44a6df3c38a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro returns the pointer <em>ptr</em> cast to the type <em>classname</em> * if the pointer is of this type (the check is done during the run-time) or <span class="literal">NULL</span> otherwise.  <a href="#ga2606f92f8d5f8e22f4afb44a6df3c38a"></a><br/></td></tr>
<tr class="separator:ga2606f92f8d5f8e22f4afb44a6df3c38a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f76c7ed5cfc61d7f5e62a1618476af5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga2f76c7ed5cfc61d7f5e62a1618476af5">wxDynamicCastThis</a>(classname)</td></tr>
<tr class="memdesc:ga2f76c7ed5cfc61d7f5e62a1618476af5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro is equivalent to <code><a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast(this, classname)</a></code> but the latter provokes spurious compilation warnings from some compilers (because it tests whether <code>this</code> pointer is non-<span class="literal">NULL</span> which is always true), so this macro should be used to avoid them.  <a href="#ga2f76c7ed5cfc61d7f5e62a1618476af5"></a><br/></td></tr>
<tr class="separator:ga2f76c7ed5cfc61d7f5e62a1618476af5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae25db7169be29d37f3451dff0ac7711"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gaae25db7169be29d37f3451dff0ac7711">wxStaticCast</a>(ptr, classname)</td></tr>
<tr class="memdesc:gaae25db7169be29d37f3451dff0ac7711"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro checks that the cast is valid in debug mode (an assert failure will result if <a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast(ptr, classname)</a> == <span class="literal">NULL</span>) and then returns the result of executing an equivalent of <code>static_cast&lt;classname *&gt;(ptr)</code>.  <a href="#gaae25db7169be29d37f3451dff0ac7711"></a><br/></td></tr>
<tr class="separator:gaae25db7169be29d37f3451dff0ac7711"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c6d4b0411eda94d041198d6385980cb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#ga0c6d4b0411eda94d041198d6385980cb">wxGetVariantCast</a>(var, classname)</td></tr>
<tr class="memdesc:ga0c6d4b0411eda94d041198d6385980cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro returns a pointer to the data stored in <em>var</em> (<a class="el" href="classwx_variant.html" title="The wxVariant class represents a container for any type.">wxVariant</a>) cast to the type <em>classname</em> if the data is of this type (the check is done during the run-time) or <span class="literal">NULL</span> otherwise.  <a href="#ga0c6d4b0411eda94d041198d6385980cb"></a><br/></td></tr>
<tr class="separator:ga0c6d4b0411eda94d041198d6385980cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad73c0b653058d5bd95fce98e624ffb2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_object.html">wxObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__rtti.html#gad73c0b653058d5bd95fce98e624ffb2d">wxCreateDynamicObject</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;className)</td></tr>
<tr class="memdesc:gad73c0b653058d5bd95fce98e624ffb2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates and returns an object of the given class, if the class has been registered with the dynamic class system using DECLARE...  <a href="#gad73c0b653058d5bd95fce98e624ffb2d"></a><br/></td></tr>
<tr class="separator:gad73c0b653058d5bd95fce98e624ffb2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gae268e701d1e2aed8539c6003f775dd73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wx_const_cast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">T, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Same as <code>const_cast&lt;T&gt;(x)</code> if the compiler supports const cast or <code></code>(T)x for old compilers. </p>
<p>Unlike <a class="el" href="group__group__funcmacro__rtti.html#ga47026a9dcf1318d6934c1e8091f3433e" title="This macro expands into const_cast&lt;classname *&gt;(ptr) if the compiler supports const_cast or into an o...">wxConstCast()</a>, the cast it to the type <code>T</code> and not to <code>T *</code> and also the order of arguments is the same as for the standard cast.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/defs.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#ga42cdce9f5bc6dbe6a846a47e9e841e4f" title="Same as reinterpret_cast&lt;T&gt;(x) if the compiler supports reinterpret cast or (T)x for old compilers...">wx_reinterpret_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#gaa3a4a52303d4a1fa3d3346e762638c64" title="Same as static_cast&lt;T&gt;(x) if the compiler supports static cast or (T)x for old compilers.">wx_static_cast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga42cdce9f5bc6dbe6a846a47e9e841e4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wx_reinterpret_cast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">T, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Same as <code>reinterpret_cast&lt;T&gt;(x)</code> if the compiler supports reinterpret cast or <code></code>(T)x for old compilers. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/defs.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#gae268e701d1e2aed8539c6003f775dd73" title="Same as const_cast&lt;T&gt;(x) if the compiler supports const cast or (T)x for old compilers.">wx_const_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#gaa3a4a52303d4a1fa3d3346e762638c64" title="Same as static_cast&lt;T&gt;(x) if the compiler supports static cast or (T)x for old compilers.">wx_static_cast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaa3a4a52303d4a1fa3d3346e762638c64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wx_static_cast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">T, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Same as <code>static_cast&lt;T&gt;(x)</code> if the compiler supports static cast or <code></code>(T)x for old compilers. </p>
<p>Unlike <a class="el" href="group__group__funcmacro__rtti.html#gaae25db7169be29d37f3451dff0ac7711" title="This macro checks that the cast is valid in debug mode (an assert failure will result if wxDynamicCas...">wxStaticCast()</a>, there are no checks being done and the meaning of the macro arguments is exactly the same as for the standard static cast, i.e. <em>T</em> is the full type name and star is not appended to it.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/defs.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#gae268e701d1e2aed8539c6003f775dd73" title="Same as const_cast&lt;T&gt;(x) if the compiler supports const cast or (T)x for old compilers.">wx_const_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga42cdce9f5bc6dbe6a846a47e9e841e4f" title="Same as reinterpret_cast&lt;T&gt;(x) if the compiler supports reinterpret cast or (T)x for old compilers...">wx_reinterpret_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga092df8a3ee35e20a4c2c7d0b6132592a" title="This case doesn’t correspond to any standard cast but exists solely to make casts which possibly resu...">wx_truncate_cast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga092df8a3ee35e20a4c2c7d0b6132592a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wx_truncate_cast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">T, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This case doesn’t correspond to any standard cast but exists solely to make casts which possibly result in a truncation of an integer value more readable. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/defs.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gacee897a7d4e704e1aa53568220f2396e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxCLASSINFO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a pointer to the <a class="el" href="classwx_class_info.html" title="This class stores meta-information about classes.">wxClassInfo</a> object associated with this class. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga47026a9dcf1318d6934c1e8091f3433e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxConstCast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">classname&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro expands into <code>const_cast&lt;classname *&gt;(ptr)</code> if the compiler supports const_cast or into an old, C-style cast, otherwise. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/defs.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#gae268e701d1e2aed8539c6003f775dd73" title="Same as const_cast&lt;T&gt;(x) if the compiler supports const cast or (T)x for old compilers.">wx_const_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#gaae25db7169be29d37f3451dff0ac7711" title="This macro checks that the cast is valid in debug mode (an assert failure will result if wxDynamicCas...">wxStaticCast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga5bbb5821d56ac801da838c42105b72ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDECLARE_ABSTRACT_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span><a class="code" href="classwx_command.html" title="wxCommand is a base class for modelling an application command, which is an action usually performed ...">wxCommand</a>: <span class="keyword">public</span> <a class="code" href="classwx_object.html" title="This is the root class of many of the wxWidgets classes.">wxObject</a></div>
<div class="line">{</div>
<div class="line">    <a class="code" href="group__group__funcmacro__rtti.html#ga5bbb5821d56ac801da838c42105b72ae" title="Used inside a class declaration to declare that the class should be made known to the class hierarchy...">wxDECLARE_ABSTRACT_CLASS</a>(<a class="code" href="classwx_command.html" title="wxCommand is a base class for modelling an application command, which is an action usually performed ...">wxCommand</a>);</div>
<div class="line"></div>
<div class="line"><span class="keyword">private</span>:</div>
<div class="line">    ...</div>
<div class="line">public:</div>
<div class="line">    ...</div>
<div class="line">};</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga1523a2d553dea288d66cd35e8a0ffd5c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDECLARE_APP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is used in headers to create a forward declaration of the <a class="el" href="group__group__funcmacro__appinitterm.html#gac387a69e740a149f9888e4992a3a4c6c" title="This function doesn&#39;t exist in wxWidgets but it is created by using the wxIMPLEMENT_APP() macro...">wxGetApp()</a> function implemented by <a class="el" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP()</a>. </p>
<p>It creates the declaration <code>className&amp; <a class="el" href="group__group__funcmacro__appinitterm.html#gac387a69e740a149f9888e4992a3a4c6c" title="This function doesn&#39;t exist in wxWidgets but it is created by using the wxIMPLEMENT_APP() macro...">wxGetApp()</a></code> (requires a final semicolon).</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/app.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><a class="code" href="group__group__funcmacro__rtti.html#ga1523a2d553dea288d66cd35e8a0ffd5c" title="This is used in headers to create a forward declaration of the wxGetApp() function implemented by wxI...">wxDECLARE_APP</a>(MyApp);</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga20465fc7e022e29a5dacfad46e152e75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDECLARE_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used inside a class declaration to declare that the class should be made known to the class hierarchy, but objects of this class cannot be created dynamically. </p>
<p>The same as <a class="el" href="group__group__funcmacro__rtti.html#ga5bbb5821d56ac801da838c42105b72ae" title="Used inside a class declaration to declare that the class should be made known to the class hierarchy...">wxDECLARE_ABSTRACT_CLASS()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga9c252d076397bec5ac241272a7a60747"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDECLARE_DYNAMIC_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare that the objects of this class should be dynamically creatable from run-time type information. </p>
<p>Notice that this implies that the class should have a default constructor, if this is not the case consider using <a class="el" href="group__group__funcmacro__rtti.html#ga5bbb5821d56ac801da838c42105b72ae" title="Used inside a class declaration to declare that the class should be made known to the class hierarchy...">wxDECLARE_ABSTRACT_CLASS()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><span class="keyword">class </span><a class="code" href="classwx_frame.html" title="A frame is a window whose size and position can (usually) be changed by the user.">wxFrame</a>: <span class="keyword">public</span> <a class="code" href="classwx_window.html" title="wxWindow is the base class for all windows and represents any visible object on screen.">wxWindow</a></div>
<div class="line">{</div>
<div class="line">    <a class="code" href="group__group__funcmacro__rtti.html#ga9c252d076397bec5ac241272a7a60747" title="Used inside a class declaration to make the class known to wxWidgets RTTI system and also declare tha...">wxDECLARE_DYNAMIC_CLASS</a>(<a class="code" href="classwx_frame.html" title="A frame is a window whose size and position can (usually) be changed by the user.">wxFrame</a>);</div>
<div class="line"></div>
<div class="line"><span class="keyword">private</span>:</div>
<div class="line">    <span class="keyword">const</span> <a class="code" href="classwx_string.html" title="String class for passing textual data to or receiving it from wxWidgets.">wxString</a>&amp; frameTitle;</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line">    ...</div>
<div class="line">};</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga2606f92f8d5f8e22f4afb44a6df3c38a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDynamicCast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">classname&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro returns the pointer <em>ptr</em> cast to the type <em>classname</em> * if the pointer is of this type (the check is done during the run-time) or <span class="literal">NULL</span> otherwise. </p>
<p>Usage of this macro is preferred over obsoleted <a class="el" href="classwx_object.html#af40d580385cf4f8112fae7713404b01e" title="Determines whether this class is a subclass of (or the same class as) the given class.">wxObject::IsKindOf()</a> function.</p>
<p>The <em>ptr</em> argument may be <span class="literal">NULL</span>, in which case <span class="literal">NULL</span> will be returned.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><a class="code" href="classwx_window.html" title="wxWindow is the base class for all windows and represents any visible object on screen.">wxWindow</a> *win = <a class="code" href="classwx_window.html#a777258379a3eef1b0530f12db6b77cab" title="Finds the window or control which currently has the keyboard focus.">wxWindow::FindFocus</a>();</div>
<div class="line"><a class="code" href="classwx_text_ctrl.html" title="A text control allows text to be displayed and edited.">wxTextCtrl</a> *text = <a class="code" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast</a>(win, <a class="code" href="classwx_text_ctrl.html" title="A text control allows text to be displayed and edited.">wxTextCtrl</a>);</div>
<div class="line"><span class="keywordflow">if</span> ( text )</div>
<div class="line">{</div>
<div class="line">    <span class="comment">// a text control has the focus...</span></div>
<div class="line">}</div>
<div class="line"><span class="keywordflow">else</span></div>
<div class="line">{</div>
<div class="line">    <span class="comment">// no window has the focus or it is not a text control</span></div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_rtti.html">Runtime Type Information (RTTI)</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga2f76c7ed5cfc61d7f5e62a1618476af5" title="This macro is equivalent to wxDynamicCast(this, classname) but the latter provokes spurious compilati...">wxDynamicCastThis()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga47026a9dcf1318d6934c1e8091f3433e" title="This macro expands into const_cast&lt;classname *&gt;(ptr) if the compiler supports const_cast or into an o...">wxConstCast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#gaae25db7169be29d37f3451dff0ac7711" title="This macro checks that the cast is valid in debug mode (an assert failure will result if wxDynamicCas...">wxStaticCast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2f76c7ed5cfc61d7f5e62a1618476af5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxDynamicCastThis</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">classname</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro is equivalent to <code><a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast(this, classname)</a></code> but the latter provokes spurious compilation warnings from some compilers (because it tests whether <code>this</code> pointer is non-<span class="literal">NULL</span> which is always true), so this macro should be used to avoid them. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga0c6d4b0411eda94d041198d6385980cb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxGetVariantCast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">var, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">classname&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro returns a pointer to the data stored in <em>var</em> (<a class="el" href="classwx_variant.html" title="The wxVariant class represents a container for any type.">wxVariant</a>) cast to the type <em>classname</em> if the data is of this type (the check is done during the run-time) or <span class="literal">NULL</span> otherwise. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/variant.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_rtti.html">Runtime Type Information (RTTI)</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2f58f4ea4376a2e3994a9e6880509027"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_ABSTRACT_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><a class="code" href="group__group__funcmacro__rtti.html#ga2f58f4ea4376a2e3994a9e6880509027" title="Used in a C++ implementation file to complete the declaration of a class that has run-time type infor...">wxIMPLEMENT_ABSTRACT_CLASS</a>(<a class="code" href="classwx_command.html" title="wxCommand is a base class for modelling an application command, which is an action usually performed ...">wxCommand</a>, <a class="code" href="classwx_object.html" title="This is the root class of many of the wxWidgets classes.">wxObject</a>);</div>
<div class="line"></div>
<div class="line"><a class="code" href="classwx_command.html#a544c13f28592ffd6a9e8b86be07e98d6" title="Constructor.">wxCommand::wxCommand</a>(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    ...</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga55f899b6146d26aa5a75a22984fa1895"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_ABSTRACT_CLASS2</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName2&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga967aafaa261481fe2d2e1cf599e3e003"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_APP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is used in the application class implementation file to make the application class known to wxWidgets for dynamic construction. </p>
<p>Note that this macro requires a final semicolon.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/app.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><a class="code" href="group__group__funcmacro__rtti.html#ga967aafaa261481fe2d2e1cf599e3e003" title="This is used in the application class implementation file to make the application class known to wxWi...">wxIMPLEMENT_APP</a>(MyApp);</div>
</div><!-- fragment --><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#ga1523a2d553dea288d66cd35e8a0ffd5c" title="This is used in headers to create a forward declaration of the wxGetApp() function implemented by wxI...">wxDECLARE_APP()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaf2d0caedeccc20619218809d4a2a7604"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically. </p>
<p>The same as <a class="el" href="group__group__funcmacro__rtti.html#ga4cbf0c21eb5986eb489dc67450eab1d1" title="Used in a C++ implementation file to complete the declaration of a class that has run-time type infor...">wxIMPLEMENT_DYNAMIC_CLASS()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gaf644ef7f6fe628bc447141936f675332"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_CLASS2</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName2&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information and two base classes, and whose instances can be created dynamically. </p>
<p>The same as <a class="el" href="group__group__funcmacro__rtti.html#ga239f80b143bae2085a271fea0b5ed9db" title="Used in a C++ implementation file to complete the declaration of a class that has run-time type infor...">wxIMPLEMENT_DYNAMIC_CLASS2()</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga4cbf0c21eb5986eb489dc67450eab1d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_DYNAMIC_CLASS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><p>Example:</p>
<div class="fragment"><div class="line"><a class="code" href="group__group__funcmacro__rtti.html#ga4cbf0c21eb5986eb489dc67450eab1d1" title="Used in a C++ implementation file to complete the declaration of a class that has run-time type infor...">wxIMPLEMENT_DYNAMIC_CLASS</a>(<a class="code" href="classwx_frame.html" title="A frame is a window whose size and position can (usually) be changed by the user.">wxFrame</a>, <a class="code" href="classwx_window.html" title="wxWindow is the base class for all windows and represents any visible object on screen.">wxWindow</a>);</div>
<div class="line"></div>
<div class="line"><a class="code" href="classwx_frame.html#af80368ba23c71c5d947c3178b8fe10fc" title="Default constructor.">wxFrame::wxFrame</a>(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    ...</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga239f80b143bae2085a271fea0b5ed9db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxIMPLEMENT_DYNAMIC_CLASS2</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">className, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">baseClassName2&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used in a C++ implementation file to complete the declaration of a class that has run-time type information, and whose instances can be created dynamically. </p>
<p>Use this for classes derived from two base classes.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gaae25db7169be29d37f3451dff0ac7711"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wxStaticCast</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ptr, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">classname&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This macro checks that the cast is valid in debug mode (an assert failure will result if <a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast(ptr, classname)</a> == <span class="literal">NULL</span>) and then returns the result of executing an equivalent of <code>static_cast&lt;classname *&gt;(ptr)</code>. </p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre><dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__rtti.html#gaa3a4a52303d4a1fa3d3346e762638c64" title="Same as static_cast&lt;T&gt;(x) if the compiler supports static cast or (T)x for old compilers.">wx_static_cast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga2606f92f8d5f8e22f4afb44a6df3c38a" title="This macro returns the pointer ptr cast to the type classname * if the pointer is of this type (the c...">wxDynamicCast()</a>, <a class="el" href="group__group__funcmacro__rtti.html#ga47026a9dcf1318d6934c1e8091f3433e" title="This macro expands into const_cast&lt;classname *&gt;(ptr) if the compiler supports const_cast or into an o...">wxConstCast()</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gad73c0b653058d5bd95fce98e624ffb2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_object.html">wxObject</a>* wxCreateDynamicObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>className</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates and returns an object of the given class, if the class has been registered with the dynamic class system using DECLARE... </p>
<p>and IMPLEMENT... macros.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/object.h&gt; </pre> 
</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:43 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>