]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/variant.tex
cleanup (mainly wrapping lines to be < 80 chars); added IsExpanded()
[wxWidgets.git] / docs / latex / wx / variant.tex
CommitLineData
43f06cfd
WS
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: variant.tex
3%% Purpose: wxVariant docs
4%% Author: wxWidgets Team
5%% Modified by:
6%% Created: 01/30/2005
7%% RCS-ID: $Id$
8%% Copyright: (c) wxWidgets Team
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
a974387a
JS
12\section{\class{wxVariant}}\label{wxvariant}
13
14The {\bf wxVariant} class represents a container for any type.
15A variant's value can be changed at run time, possibly to a different type of value.
16
38f82bf6 17As standard, wxVariant can store values of type bool, wxChar, double, long, string,
2562c823
RR
18string list, time, date, void pointer, list of strings, and list of variants.
19However, an application can extend wxVariant's capabilities by deriving from the
20class \helpref{wxVariantData}{wxvariantdata} and using the wxVariantData form of
21the wxVariant constructor or assignment operator to assign this data to a variant.
22Actual values for user-defined types will need to be accessed via the wxVariantData
23object, unlike the case for basic data types where convenience functions such as
24\helpref{GetLong}{wxvariantgetlong} can be used.
25
eb753b56 26Pointers to any \helpref{wxObject}{wxobject} derived class can also easily be stored
2562c823
RR
27in a wxVariant. wxVariant will then use wxWidgets' built-in RTTI system to set the
28type name (returned by \helpref{GetType}{wxvariantgettype}) and to perform
29type-safety checks at runtime.
a974387a
JS
30
31This class is useful for reducing the programming for certain tasks, such as an editor
32for different data types, or a remote procedure call protocol.
33
3f90a399
RR
34An optional name member is associated with a wxVariant. This might be used, for example,
35in CORBA or OLE automation classes, where named parameters are required.
a974387a 36
eb753b56 37Note that as of wxWidgets 2.7.1, wxVariant is reference counted. Additionally, the
3f90a399
RR
38conveniance macros {\bf DECLARE\_VARIANT\_OBJECT} and {\bf IMPLEMENT\_VARIANT\_OBJECT}
39were added so that adding (limited) support for conversion to and from wxVariant
eb753b56 40can be very easily implemented without modifiying either wxVariant or the class
3f90a399
RR
41to be stored by wxVariant. Since assignement operators cannot be declared outside
42the class, the shift left operators are used like this:
43
44\begin{verbatim}
45 // in the header file
46 DECLARE_VARIANT_OBJECT(MyClass)
47
48 // in the implementation file
49 IMPLMENT_VARIANT_OBJECT(MyClass)
50
51 // in the user code
52 wxVariant variant;
53 MyClass value;
54 variant << value;
55
56 // or
57 value << variant;
58\end{verbatim}
59
60For this to work, MyClass must derive from \helpref{wxObject}{wxobject}, implement
61the \helpref{wxWidgets RTTI system}{runtimeclassoverview}
62and support the assignment operator and equality operator for itself. Ideally, it
63should also be reference counted to make copying operations cheap and fast. This
64can be most easily implemented using the reference counting support offered by
65\helpref{wxObject}{wxobject} itself. By default, wxWidgets already implements
66the shift operator conversion for a few of its drawing related classes:
67
68\begin{verbatim}
69IMPLEMENT_VARIANT_OBJECT(wxColour)
3f90a399
RR
70IMPLEMENT_VARIANT_OBJECT(wxImage)
71IMPLEMENT_VARIANT_OBJECT(wxIcon)
72IMPLEMENT_VARIANT_OBJECT(wxBitmap)
73\end{verbatim}
2562c823 74
a974387a
JS
75\wxheading{Derived from}
76
77\helpref{wxObject}{wxobject}
78
954b8ae6
JS
79\wxheading{Include files}
80
81<wx/variant.h>
82
a974387a
JS
83\wxheading{See also}
84
85\helpref{wxVariantData}{wxvariantdata}
86
87\latexignore{\rtfignore{\wxheading{Members}}}
88
89\membersection{wxVariant::wxVariant}\label{wxvariantctor}
90
91\func{}{wxVariant}{\void}
92
93Default constructor.
94
95\func{}{wxVariant}{\param{const wxVariant\& }{variant}}
96
97Copy constructor.
98
38f82bf6 99\func{}{wxVariant}{\param{const wxChar*}{ value}, \param{const wxString\& }{name = ``"}}
f6bcfd97 100
a974387a
JS
101\func{}{wxVariant}{\param{const wxString\&}{ value}, \param{const wxString\& }{name = ``"}}
102
103Construction from a string value.
104
38f82bf6 105\func{}{wxVariant}{\param{wxChar}{ value}, \param{const wxString\& }{name = ``"}}
a974387a
JS
106
107Construction from a character value.
108
109\func{}{wxVariant}{\param{long}{ value}, \param{const wxString\& }{name = ``"}}
110
111Construction from an integer value. You may need to cast to (long) to
112avoid confusion with other constructors (such as the bool constructor).
113
114\func{}{wxVariant}{\param{bool}{ value}, \param{const wxString\& }{name = ``"}}
115
116Construction from a boolean value.
117
118\func{}{wxVariant}{\param{double}{ value}, \param{const wxString\& }{name = ``"}}
119
120Construction from a double-precision floating point value.
121
122\func{}{wxVariant}{\param{const wxList\&}{ value}, \param{const wxString\& }{name = ``"}}
123
124Construction from a list of wxVariant objects. This constructor
125copies {\it value}, the application is still responsible for
126deleting {\it value} and its contents.
127
a974387a
JS
128\func{}{wxVariant}{\param{void*}{ value}, \param{const wxString\& }{name = ``"}}
129
130Construction from a void pointer.
131
cf6ae290
RG
132\func{}{wxVariant}{\param{wxObject*}{ value}, \param{const wxString\& }{name = ``"}}
133
134Construction from a wxObject pointer.
135
a974387a
JS
136\func{}{wxVariant}{\param{wxVariantData*}{ data}, \param{const wxString\& }{name = ``"}}
137
8715d2d3
RN
138Construction from user-defined data. The variant holds onto the {\it data} pointer.
139
140\func{}{wxVariant}{\param{wxDateTime\&}{ val}, \param{const wxString\& }{name = ``"}}
141
43f06cfd 142Construction from a \helpref{wxDateTime}{wxdatetime}.
8715d2d3
RN
143
144\func{}{wxVariant}{\param{wxArrayString\&}{ val}, \param{const wxString\& }{name = ``"}}
145
146Construction from an array of strings. This constructor copies {\it value} and its contents.
147
148\func{}{wxVariant}{\param{DATE\_STRUCT*}{ val}, \param{const wxString\& }{name = ``"}}
149
150Construction from a odbc date value. Represented internally by a \helpref{wxDateTime}{wxdatetime} value.
151
152\func{}{wxVariant}{\param{TIME\_STRUCT*}{ val}, \param{const wxString\& }{name = ``"}}
153
154Construction from a odbc time value. Represented internally by a \helpref{wxDateTime}{wxdatetime} value.
155
156\func{}{wxVariant}{\param{TIMESTAMP\_STRUCT*}{ val}, \param{const wxString\& }{name = ``"}}
157
158Construction from a odbc timestamp value. Represented internally by a \helpref{wxDateTime}{wxdatetime} value.
a974387a
JS
159
160\membersection{wxVariant::\destruct{wxVariant}}\label{wxvariantdtor}
161
162\func{}{\destruct{wxVariant}}{\void}
163
164Destructor.
165
2562c823
RR
166Note that destructor is protected, so wxVariantData cannot usually
167be deleted. Instead, \helpref{DecRef}{wxvariantdatadecref} should be called.
168
8715d2d3 169
a974387a
JS
170\membersection{wxVariant::Append}\label{wxvariantappend}
171
172\func{void}{Append}{\param{const wxVariant\&}{ value}}
173
174Appends a value to the list.
175
2562c823
RR
176\membersection{wxVariant::Clear}\label{wxvariantclear}
177
178\func{void}{Clear}{\void}
179
180Makes the variant null by deleting the internal data and
181set the name to {\it wxEmptyString}.
182
a974387a
JS
183\membersection{wxVariant::ClearList}\label{wxvariantclearlist}
184
185\func{void}{ClearList}{\void}
186
187Deletes the contents of the list.
188
8715d2d3
RN
189
190\membersection{wxVariant::Convert}\label{wxvariantconvert}
191
0f353563 192\constfunc{bool}{Convert}{\param{long*}{ value}}
8715d2d3 193
0f353563 194\constfunc{bool}{Convert}{\param{bool*}{ value}}
8715d2d3 195
0f353563 196\constfunc{bool}{Convert}{\param{double*}{ value}}
8715d2d3 197
0f353563 198\constfunc{bool}{Convert}{\param{wxString*}{ value}}
8715d2d3 199
38f82bf6 200\constfunc{bool}{Convert}{\param{wxChar*}{ value}}
8715d2d3 201
0f353563 202\constfunc{bool}{Convert}{\param{wxDateTime*}{ value}}
8715d2d3
RN
203
204Retrieves and converts the value of this variant to the type that {\it value} is.
205
206
a974387a
JS
207\membersection{wxVariant::GetCount}\label{wxvariantgetcount}
208
0902898a 209\constfunc{size\_t}{GetCount}{\void}
a974387a
JS
210
211Returns the number of elements in the list.
212
213\membersection{wxVariant::Delete}\label{wxvariantdelete}
214
0902898a 215\func{bool}{Delete}{\param{size\_t }{item}}
a974387a
JS
216
217Deletes the zero-based {\it item} from the list.
218
8715d2d3
RN
219\membersection{wxVariant::GetArrayString}\label{wxvariantgetarraystring}
220
221\constfunc{wxArrayString}{GetArrayString}{\void}
222
223Returns the string array value.
224
a974387a
JS
225\membersection{wxVariant::GetBool}\label{wxvariantgetbool}
226
227\constfunc{bool}{GetBool}{\void}
228
229Returns the boolean value.
230
231\membersection{wxVariant::GetChar}\label{wxvariantgetchar}
232
38f82bf6 233\constfunc{wxChar}{GetChar}{\void}
a974387a
JS
234
235Returns the character value.
236
237\membersection{wxVariant::GetData}\label{wxvariantgetdata}
238
239\constfunc{wxVariantData*}{GetData}{\void}
240
2562c823
RR
241Returns a pointer to the internal variant data. To take ownership
242of this data, you must call its \helpref{IncRef}{wxvariantdataincref}
243method. When you stop using it, \helpref{DecRef}{wxvariantdatadecref}
244must be likewise called.
a974387a 245
8715d2d3
RN
246\membersection{wxVariant::GetDateTime}\label{wxvariantgetdatetime}
247
248\constfunc{wxDateTime}{GetDateTime}{\void}
249
250Returns the date value.
251
a974387a
JS
252\membersection{wxVariant::GetDouble}\label{wxvariantgetdouble}
253
254\constfunc{double}{GetDouble}{\void}
255
256Returns the floating point value.
257
258\membersection{wxVariant::GetLong}\label{wxvariantgetlong}
259
260\constfunc{long}{GetLong}{\void}
261
262Returns the integer value.
263
264\membersection{wxVariant::GetName}\label{wxvariantgetname}
265
266\constfunc{const wxString\&}{GetName}{\void}
267
268Returns a constant reference to the variant name.
269
270\membersection{wxVariant::GetString}\label{wxvariantgetstring}
271
272\constfunc{wxString}{GetString}{\void}
273
274Gets the string value.
275
a974387a
JS
276\membersection{wxVariant::GetType}\label{wxvariantgettype}
277
278\constfunc{wxString}{GetType}{\void}
279
280Returns the value type as a string. The built-in types are: bool, char, date, double, list, long, string, stringlist, time, void*.
281
282If the variant is null, the value type returned is the string ``null" (not the empty string).
283
284\membersection{wxVariant::GetVoidPtr}\label{wxvariantgetvoidptr}
285
286\constfunc{void*}{GetVoidPtr}{\void}
287
288Gets the void pointer value.
289
cf6ae290
RG
290\membersection{wxVariant::GetWxObjectPtr}\label{wxvariantgetwxobjectptr}
291
cfd5930d 292\constfunc{wxObject*}{GetWxObjectPtr}{\void}
cf6ae290
RG
293
294Gets the wxObject pointer value.
295
a974387a
JS
296\membersection{wxVariant::Insert}\label{wxvariantinsert}
297
298\func{void}{Insert}{\param{const wxVariant\&}{ value}}
299
300Inserts a value at the front of the list.
301
302\membersection{wxVariant::IsNull}\label{wxvariantisnull}
303
304\constfunc{bool}{IsNull}{\void}
305
cc81d32f 306Returns true if there is no data associated with this variant, false if there is data.
a974387a
JS
307
308\membersection{wxVariant::IsType}\label{wxvariantistype}
309
310\constfunc{bool}{IsType}{\param{const wxString\&}{ type}}
311
cc81d32f 312Returns true if {\it type} matches the type of the variant, false otherwise.
a974387a 313
cf6ae290
RG
314\membersection{wxVariant::IsValueKindOf}\label{wxvariantisvaluekindof}
315
316\constfunc{bool}{IsValueKindOf}{\param{const wxClassInfo* type}{ type}}
317
318Returns true if the data is derived from the class described by {\it type}, false otherwise.
319
a974387a
JS
320\membersection{wxVariant::MakeNull}\label{wxvariantmakenull}
321
322\func{void}{MakeNull}{\void}
323
324Makes the variant null by deleting the internal data.
325
326\membersection{wxVariant::MakeString}\label{wxvariantmakestring}
327
328\constfunc{wxString}{MakeString}{\void}
329
330Makes a string representation of the variant value (for any type).
331
332\membersection{wxVariant::Member}\label{wxvariantmember}
333
334\constfunc{bool}{Member}{\param{const wxVariant\&}{ value}}
335
cc81d32f 336Returns true if {\it value} matches an element in the list.
a974387a
JS
337
338\membersection{wxVariant::NullList}\label{wxvariantnulllist}
339
340\func{void}{NullList}{\void}
341
342Makes an empty list. This differs from a null variant which has no data; a null list
343is of type list, but the number of elements in the list is zero.
344
345\membersection{wxVariant::SetData}\label{wxvariantsetdata}
346
347\func{void}{SetData}{\param{wxVariantData*}{ data}}
348
349Sets the internal variant data, deleting the existing data if there is any.
350
351\membersection{wxVariant::operator $=$}\label{wxvariantassignment}
352
353\func{void}{operator $=$}{\param{const wxVariant\& }{value}}
354
355\func{void}{operator $=$}{\param{wxVariantData* }{value}}
356
357\func{void}{operator $=$}{\param{const wxString\& }{value}}
358
38f82bf6 359\func{void}{operator $=$}{\param{const wxChar* }{value}}
a974387a 360
38f82bf6 361\func{void}{operator $=$}{\param{wxChar }{value}}
a974387a
JS
362
363\func{void}{operator $=$}{\param{const long }{value}}
364
365\func{void}{operator $=$}{\param{const bool }{value}}
366
367\func{void}{operator $=$}{\param{const double }{value}}
368
a974387a
JS
369\func{void}{operator $=$}{\param{void* }{value}}
370
2f620946
RR
371\func{void}{operator $=$}{\param{wxObject* }{value}}
372
a974387a
JS
373\func{void}{operator $=$}{\param{const wxList\& }{value}}
374
8715d2d3
RN
375\func{void}{operator $=$}{\param{const wxDateTime\& }{value}}
376
377\func{void}{operator $=$}{\param{const wxArrayString\& }{value}}
378
379\func{void}{operator $=$}{\param{const DATE\_STRUCT* }{value}}
380
381\func{void}{operator $=$}{\param{const TIME\_STRUCT* }{value}}
382
383\func{void}{operator $=$}{\param{const TIMESTAMP\_STRUCT* }{value}}
384
a974387a
JS
385Assignment operators.
386
387\membersection{wxVariant::operator $==$}\label{wxvarianteq}
388
8715d2d3
RN
389\constfunc{bool}{operator $==$}{\param{const wxVariant\& }{value}}
390
391\constfunc{bool}{operator $==$}{\param{const wxString\& }{value}}
a974387a 392
38f82bf6 393\constfunc{bool}{operator $==$}{\param{const wxChar* }{value}}
a974387a 394
38f82bf6 395\constfunc{bool}{operator $==$}{\param{wxChar }{value}}
a974387a 396
8715d2d3 397\constfunc{bool}{operator $==$}{\param{const long }{value}}
a974387a 398
8715d2d3 399\constfunc{bool}{operator $==$}{\param{const bool }{value}}
a974387a 400
8715d2d3 401\constfunc{bool}{operator $==$}{\param{const double }{value}}
a974387a 402
8715d2d3 403\constfunc{bool}{operator $==$}{\param{void* }{value}}
a974387a 404
2f620946
RR
405\constfunc{bool}{operator $==$}{\param{wxObject* }{value}}
406
8715d2d3 407\constfunc{bool}{operator $==$}{\param{const wxList\& }{value}}
a974387a 408
8715d2d3
RN
409\constfunc{bool}{operator $==$}{\param{const wxArrayString\& }{value}}
410
411\constfunc{bool}{operator $==$}{\param{const wxDateTime\& }{value}}
a974387a
JS
412
413Equality test operators.
414
415\membersection{wxVariant::operator $!=$}\label{wxvariantneq}
416
8715d2d3
RN
417\constfunc{bool}{operator $!=$}{\param{const wxVariant\& }{value}}
418
419\constfunc{bool}{operator $!=$}{\param{const wxString\& }{value}}
a974387a 420
38f82bf6 421\constfunc{bool}{operator $!=$}{\param{const wxChar* }{value}}
a974387a 422
38f82bf6 423\constfunc{bool}{operator $!=$}{\param{wxChar }{value}}
a974387a 424
8715d2d3 425\constfunc{bool}{operator $!=$}{\param{const long }{value}}
a974387a 426
8715d2d3 427\constfunc{bool}{operator $!=$}{\param{const bool }{value}}
a974387a 428
8715d2d3 429\constfunc{bool}{operator $!=$}{\param{const double }{value}}
a974387a 430
8715d2d3 431\constfunc{bool}{operator $!=$}{\param{void* }{value}}
a974387a 432
2f620946
RR
433\constfunc{bool}{operator $!=$}{\param{wxObject* }{value}}
434
8715d2d3 435\constfunc{bool}{operator $!=$}{\param{const wxList\& }{value}}
a974387a 436
8715d2d3
RN
437\constfunc{bool}{operator $!=$}{\param{const wxArrayString\& }{value}}
438
439\constfunc{bool}{operator $!=$}{\param{const wxDateTime\& }{value}}
a974387a
JS
440
441Inequality test operators.
442
443\membersection{wxVariant::operator $[]$}\label{wxvariantarray}
444
445\constfunc{wxVariant}{operator $[]$}{\param{size\_t }{idx}}
446
447Returns the value at {\it idx} (zero-based).
448
449\func{wxVariant\&}{operator $[]$}{\param{size\_t }{idx}}
450
451Returns a reference to the value at {\it idx} (zero-based). This can be used
452to change the value at this index.
453
38f82bf6 454\membersection{wxVariant::operator wxChar}\label{wxvariantchar}
a974387a 455
38f82bf6 456\constfunc{char}{operator wxChar}{\void}
a974387a 457
38f82bf6 458Operator for implicit conversion to a wxChar, using \helpref{wxVariant::GetChar}{wxvariantgetchar}.
a974387a
JS
459
460\membersection{wxVariant::operator double}\label{wxvariantdouble}
461
462\constfunc{double}{operator double}{\void}
463
464Operator for implicit conversion to a double, using \helpref{wxVariant::GetDouble}{wxvariantgetdouble}.
465
466\constfunc{long}{operator long}{\void}
467
468Operator for implicit conversion to a long, using \helpref{wxVariant::GetLong}{wxvariantgetlong}.
469
a974387a
JS
470\membersection{wxVariant::operator wxString}\label{wxvariantwxstring}
471
472\constfunc{wxString}{operator wxString}{\void}
473
474Operator for implicit conversion to a string, using \helpref{wxVariant::MakeString}{wxvariantmakestring}.
475
a974387a
JS
476\membersection{wxVariant::operator void*}\label{wxvariantvoid}
477
478\constfunc{void*}{operator void*}{\void}
479
480Operator for implicit conversion to a pointer to a void, using \helpref{wxVariant::GetVoidPtr}{wxvariantgetvoidptr}.
481
8715d2d3
RN
482\membersection{wxVariant::operator wxDateTime}\label{wxvariantdatetime}
483
484\constfunc{void*}{operator wxDateTime}{\void}
485
486Operator for implicit conversion to a pointer to a \helpref{wxDateTime}{wxdatetime}, using \helpref{wxVariant::GetDateTime}{wxvariantgetdatetime}.
487
a974387a
JS
488\section{\class{wxVariantData}}\label{wxvariantdata}
489
490The {\bf wxVariantData} is used to implement a new type for wxVariant. Derive from wxVariantData,
491and override the pure virtual functions.
492
2562c823
RR
493wxVariantData is reference counted, but you don't normally have to care about this, as
494wxVariant manages the count automatically. However, incase your application needs to take
495ownership of wxVariantData, be aware that the object is created with reference count of 1,
496and passing it to wxVariant will not increase this. In other words, \helpref{IncRef}{wxvariantdataincref}
497needs to be called only if you both take ownership of wxVariantData and pass it to a wxVariant.
498Also note that the destructor is protected, so you can never explicitly delete a wxVariantData
499instance. Instead, \helpref{DecRef}{wxvariantdatadecref} will delete the object automatically
500when the reference count reaches zero.
501
a974387a
JS
502\wxheading{Derived from}
503
504\helpref{wxObject}{wxobject}
505
954b8ae6
JS
506\wxheading{Include files}
507
508<wx/variant.h>
509
a974387a
JS
510\wxheading{See also}
511
512\helpref{wxVariant}{wxvariant}
513
514\latexignore{\rtfignore{\wxheading{Members}}}
515
516\membersection{wxVariantData::wxVariantData}\label{wxvariantdatactor}
517
518\func{}{wxVariantData}{\void}
519
520Default constructor.
521
2562c823
RR
522\membersection{wxVariantData::DecRef}\label{wxvariantdatadecref}
523
524\func{void}{DecRef}{\void}
a974387a 525
2562c823
RR
526Decreases reference count. If the count reaches zero, the object is
527automatically deleted.
a974387a 528
2562c823
RR
529Note that destructor of wxVariantData is protected, so delete
530cannot be used as normal. Instead, DecRef should be called.
a974387a
JS
531
532\membersection{wxVariantData::Eq}\label{wxvariantdataeq}
533
534\constfunc{bool}{Eq}{\param{wxVariantData\&}{ data}}
535
cc81d32f 536Returns true if this object is equal to {\it data}.
a974387a
JS
537
538\membersection{wxVariantData::GetType}\label{wxvariantdatagettype}
539
540\constfunc{wxString}{GetType}{\void}
541
542Returns the string type of the data.
543
cf6ae290
RG
544\membersection{wxVariantData::GetValueClassInfo}\label{wxvariantdatagetvalueclassinfo}
545
546\constfunc{wxClassInfo*}{GetValueClassInfo}{\void}
547
548If the data is a wxObject returns a pointer to the objects wxClassInfo structure, if
549the data isn't a wxObject the method returns NULL.
550
2562c823
RR
551\membersection{wxVariantData::IncRef}\label{wxvariantdataincref}
552
553\func{void}{IncRef}{\void}
554
555Increases reference count. Note that initially wxVariantData has reference count of 1.
556
a974387a
JS
557\membersection{wxVariantData::Read}\label{wxvariantdataread}
558
559\func{bool}{Read}{\param{ostream\&}{ stream}}
560
561\func{bool}{Read}{\param{wxString\&}{ string}}
562
563Reads the data from {\it stream} or {\it string}.
564
565\membersection{wxVariantData::Write}\label{wxvariantdatawrite}
566
567\constfunc{bool}{Write}{\param{ostream\&}{ stream}}
568
569\constfunc{bool}{Write}{\param{wxString\&}{ string}}
570
571Writes the data to {\it stream} or {\it string}.
572
573
cf6ae290
RG
574\membersection{wxGetVariantCast}\label{wxgetvariantcast}
575
576\func{classname *}{wxGetVariantCast}{wxVariant\&, classname}
577
578This macro returns the data stored in {\it variant} cast to the type {\it classname *} if
579the data is of this type (the check is done during the run-time) or
43f06cfd 580{\tt NULL} otherwise.
cf6ae290
RG
581
582
583\wxheading{See also}
a974387a 584
cf6ae290 585\helpref{RTTI overview}{runtimeclassoverview}\\
0497e172 586\helpref{wxDynamicCast}{wxdynamiccast}
b67a86d5 587