An optional name member is associated with a wxVariant. This might be used, for example, in CORBA
or OLE automation classes, where named parameters are required.
-wxVariant is similar to wxExpr and also to wxPropertyValue. However, wxExpr is efficiency-optimized for
-a restricted range of data types, whereas wxVariant is less efficient but more extensible.
-wxPropertyValue may be replaced by wxVariant eventually.
-
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
copies {\it value}, the application is still responsible for
deleting {\it value} and its contents.
-%Note: this constructor is currently disabled because it causes a C++ ambiguity.
-
-\func{}{wxVariant}{\param{const wxTime\&}{ value}, \param{const wxString\& }{name = ``"}}
-
-Construction from a time.
-
-\func{}{wxVariant}{\param{const wxDate\&}{ value}, \param{const wxString\& }{name = ``"}}
-
-Construction from a date.
-
\func{}{wxVariant}{\param{void*}{ value}, \param{const wxString\& }{name = ``"}}
Construction from a void pointer.
+\func{}{wxVariant}{\param{wxObject*}{ value}, \param{const wxString\& }{name = ``"}}
+
+Construction from a wxObject pointer.
+
\func{}{wxVariant}{\param{wxVariantData*}{ data}, \param{const wxString\& }{name = ``"}}
Construction from user-defined data. The variant holds on to the {\it data} pointer.
Returns a pointer to the internal variant data.
-\membersection{wxVariant::GetDate}\label{wxvariantgetdate}
-
-\constfunc{wxDate}{GetDate}{\void}
-
-Gets the date value.
-
\membersection{wxVariant::GetDouble}\label{wxvariantgetdouble}
\constfunc{double}{GetDouble}{\void}
Gets the string value.
-\membersection{wxVariant::GetTime}\label{wxvariantgettime}
-
-\constfunc{wxTime}{GetTime}{\void}
-
-Gets the time value.
-
\membersection{wxVariant::GetType}\label{wxvariantgettype}
\constfunc{wxString}{GetType}{\void}
Gets the void pointer value.
+\membersection{wxVariant::GetWxObjectPtr}\label{wxvariantgetwxobjectptr}
+
+\constfunc{void*}{GetWxObjectPtr}{\void}
+
+Gets the wxObject pointer value.
+
\membersection{wxVariant::Insert}\label{wxvariantinsert}
\func{void}{Insert}{\param{const wxVariant\&}{ value}}
Returns true if {\it type} matches the type of the variant, false otherwise.
+\membersection{wxVariant::IsValueKindOf}\label{wxvariantisvaluekindof}
+
+\constfunc{bool}{IsValueKindOf}{\param{const wxClassInfo* type}{ type}}
+
+Returns true if the data is derived from the class described by {\it type}, false otherwise.
+
\membersection{wxVariant::MakeNull}\label{wxvariantmakenull}
\func{void}{MakeNull}{\void}
\func{void}{operator $=$}{\param{const double }{value}}
-\func{void}{operator $=$}{\param{const wxDate\& }{value}}
-
-\func{void}{operator $=$}{\param{const wxTime\& }{value}}
-
\func{void}{operator $=$}{\param{void* }{value}}
\func{void}{operator $=$}{\param{const wxList\& }{value}}
\func{bool}{operator $==$}{\param{const double }{value}}
-\func{bool}{operator $==$}{\param{const wxDate\& }{value}}
-
-\func{bool}{operator $==$}{\param{const wxTime\& }{value}}
-
\func{bool}{operator $==$}{\param{void* }{value}}
\func{bool}{operator $==$}{\param{const wxList\& }{value}}
\func{bool}{operator $!=$}{\param{const double }{value}}
-\func{bool}{operator $!=$}{\param{const wxDate\& }{value}}
-
-\func{bool}{operator $!=$}{\param{const wxTime\& }{value}}
-
\func{bool}{operator $!=$}{\param{void* }{value}}
\func{bool}{operator $!=$}{\param{const wxList\& }{value}}
Operator for implicit conversion to a long, using \helpref{wxVariant::GetLong}{wxvariantgetlong}.
-\membersection{wxVariant::operator wxDate}\label{wxvariantwxdate}
-
-\constfunc{wxDate}{operator wxDate}{\void}
-
-Operator for implicit conversion to a wxDate, using \helpref{wxVariant::GetDate}{wxvariantgetdate}.
-
\membersection{wxVariant::operator wxString}\label{wxvariantwxstring}
\constfunc{wxString}{operator wxString}{\void}
Operator for implicit conversion to a string, using \helpref{wxVariant::MakeString}{wxvariantmakestring}.
-\membersection{wxVariant::operator wxTime}\label{wxvariantwxtime}
-
-\constfunc{wxTime}{operator wxTime}{\void}
-
-Operator for implicit conversion to a wxTime, using \helpref{wxVariant::GetTime}{wxvariantgettime}.
-
\membersection{wxVariant::operator void*}\label{wxvariantvoid}
\constfunc{void*}{operator void*}{\void}
Returns the string type of the data.
+\membersection{wxVariantData::GetValueClassInfo}\label{wxvariantdatagetvalueclassinfo}
+
+\constfunc{wxClassInfo*}{GetValueClassInfo}{\void}
+
+If the data is a wxObject returns a pointer to the objects wxClassInfo structure, if
+the data isn't a wxObject the method returns NULL.
+
\membersection{wxVariantData::Read}\label{wxvariantdataread}
\func{bool}{Read}{\param{ostream\&}{ stream}}
Writes the data to {\it stream} or {\it string}.
+\membersection{wxGetVariantCast}\label{wxgetvariantcast}
+
+\func{classname *}{wxGetVariantCast}{wxVariant\&, classname}
+
+This macro returns the data stored in {\it variant} cast to the type {\it classname *} if
+the data is of this type (the check is done during the run-time) or
+{\tt NULL} otherwise.
+
+
+\wxheading{See also}
+
+\helpref{RTTI overview}{runtimeclassoverview}\\
+\helpref{wxDynamicCast}{wxdynamiccast}