X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..d3e78bab3ea46183c22a5f0484b931a99b897636:/docs/latex/wx/variant.tex diff --git a/docs/latex/wx/variant.tex b/docs/latex/wx/variant.tex index f09ee5898c..06384d9f3b 100644 --- a/docs/latex/wx/variant.tex +++ b/docs/latex/wx/variant.tex @@ -80,20 +80,14 @@ Construction from a list of strings. This constructor 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. @@ -146,12 +140,6 @@ Returns the character value. 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} @@ -176,12 +164,6 @@ Returns a constant reference to the variant name. 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} @@ -196,6 +178,12 @@ If the variant is null, the value type returned is the string ``null" (not the e 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}} @@ -206,13 +194,19 @@ Inserts a value at the front of the list. \constfunc{bool}{IsNull}{\void} -Returns TRUE if there is no data associated with this variant, FALSE if there is data. +Returns true if there is no data associated with this variant, false if there is data. \membersection{wxVariant::IsType}\label{wxvariantistype} \constfunc{bool}{IsType}{\param{const wxString\&}{ type}} -Returns TRUE if {\it type} matches the type of the variant, FALSE otherwise. +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} @@ -230,7 +224,7 @@ Makes a string representation of the variant value (for any type). \constfunc{bool}{Member}{\param{const wxVariant\&}{ value}} -Returns TRUE if {\it value} matches an element in the list. +Returns true if {\it value} matches an element in the list. \membersection{wxVariant::NullList}\label{wxvariantnulllist} @@ -263,10 +257,6 @@ Sets the internal variant data, deleting the existing data if there is any. \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}} @@ -291,10 +281,6 @@ Assignment operators. \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}} @@ -319,10 +305,6 @@ Equality test operators. \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}} @@ -358,24 +340,12 @@ Operator for implicit conversion to a double, using \helpref{wxVariant::GetDoubl 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} @@ -417,7 +387,7 @@ Copy the data from `this' object to {\it data}. \constfunc{bool}{Eq}{\param{wxVariantData\&}{ data}} -Returns TRUE if this object is equal to {\it data}. +Returns true if this object is equal to {\it data}. \membersection{wxVariantData::GetType}\label{wxvariantdatagettype} @@ -425,6 +395,13 @@ Returns TRUE if this object is equal to {\it data}. 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}} @@ -442,4 +419,17 @@ Reads the data from {\it stream} or {\it string}. 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}