variant.tex

来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 500 行 · 第 1/2 页

TEX
500
字号

\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}

Makes the variant null by deleting the internal data.

\membersection{wxVariant::MakeString}\label{wxvariantmakestring}

\constfunc{wxString}{MakeString}{\void}

Makes a string representation of the variant value (for any type).

\membersection{wxVariant::Member}\label{wxvariantmember}

\constfunc{bool}{Member}{\param{const wxVariant\&}{ value}}

Returns true if {\it value} matches an element in the list.

\membersection{wxVariant::NullList}\label{wxvariantnulllist}

\func{void}{NullList}{\void}

Makes an empty list. This differs from a null variant which has no data; a null list
is of type list, but the number of elements in the list is zero.

\membersection{wxVariant::SetData}\label{wxvariantsetdata}

\func{void}{SetData}{\param{wxVariantData*}{ data}}

Sets the internal variant data, deleting the existing data if there is any.

\membersection{wxVariant::operator $=$}\label{wxvariantassignment}

\func{void}{operator $=$}{\param{const wxVariant\& }{value}}

\func{void}{operator $=$}{\param{wxVariantData* }{value}}

\func{void}{operator $=$}{\param{const wxString\& }{value}}

\func{void}{operator $=$}{\param{const char* }{value}}

\func{void}{operator $=$}{\param{char }{value}}

\func{void}{operator $=$}{\param{const long }{value}}

\func{void}{operator $=$}{\param{const bool }{value}}

\func{void}{operator $=$}{\param{const double }{value}}

\func{void}{operator $=$}{\param{void* }{value}}

\func{void}{operator $=$}{\param{const wxList\& }{value}}

\func{void}{operator $=$}{\param{const wxDateTime\& }{value}}

\func{void}{operator $=$}{\param{const wxArrayString\& }{value}}

\func{void}{operator $=$}{\param{const DATE\_STRUCT* }{value}}

\func{void}{operator $=$}{\param{const TIME\_STRUCT* }{value}}

\func{void}{operator $=$}{\param{const TIMESTAMP\_STRUCT* }{value}}

Assignment operators.

\membersection{wxVariant::operator $==$}\label{wxvarianteq}

\constfunc{bool}{operator $==$}{\param{const wxVariant\& }{value}}

\constfunc{bool}{operator $==$}{\param{const wxString\& }{value}}

\constfunc{bool}{operator $==$}{\param{const char* }{value}}

\constfunc{bool}{operator $==$}{\param{char }{value}}

\constfunc{bool}{operator $==$}{\param{const long }{value}}

\constfunc{bool}{operator $==$}{\param{const bool }{value}}

\constfunc{bool}{operator $==$}{\param{const double }{value}}

\constfunc{bool}{operator $==$}{\param{void* }{value}}

\constfunc{bool}{operator $==$}{\param{const wxList\& }{value}}

\constfunc{bool}{operator $==$}{\param{const wxArrayString\& }{value}}

\constfunc{bool}{operator $==$}{\param{const wxDateTime\& }{value}}

Equality test operators.

\membersection{wxVariant::operator $!=$}\label{wxvariantneq}

\constfunc{bool}{operator $!=$}{\param{const wxVariant\& }{value}}

\constfunc{bool}{operator $!=$}{\param{const wxString\& }{value}}

\constfunc{bool}{operator $!=$}{\param{const char* }{value}}

\constfunc{bool}{operator $!=$}{\param{char }{value}}

\constfunc{bool}{operator $!=$}{\param{const long }{value}}

\constfunc{bool}{operator $!=$}{\param{const bool }{value}}

\constfunc{bool}{operator $!=$}{\param{const double }{value}}

\constfunc{bool}{operator $!=$}{\param{void* }{value}}

\constfunc{bool}{operator $!=$}{\param{const wxList\& }{value}}

\constfunc{bool}{operator $!=$}{\param{const wxArrayString\& }{value}}

\constfunc{bool}{operator $!=$}{\param{const wxDateTime\& }{value}}

Inequality test operators.

\membersection{wxVariant::operator $[]$}\label{wxvariantarray}

\constfunc{wxVariant}{operator $[]$}{\param{size\_t }{idx}}

Returns the value at {\it idx} (zero-based).

\func{wxVariant\&}{operator $[]$}{\param{size\_t }{idx}}

Returns a reference to the value at {\it idx} (zero-based). This can be used
to change the value at this index.

\membersection{wxVariant::operator char}\label{wxvariantchar}

\constfunc{char}{operator char}{\void}

Operator for implicit conversion to a char, using \helpref{wxVariant::GetChar}{wxvariantgetchar}.

\membersection{wxVariant::operator double}\label{wxvariantdouble}

\constfunc{double}{operator double}{\void}

Operator for implicit conversion to a double, using \helpref{wxVariant::GetDouble}{wxvariantgetdouble}.

\constfunc{long}{operator long}{\void}

Operator for implicit conversion to a long, using \helpref{wxVariant::GetLong}{wxvariantgetlong}.

\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 void*}\label{wxvariantvoid}

\constfunc{void*}{operator void*}{\void}

Operator for implicit conversion to a pointer to a void, using \helpref{wxVariant::GetVoidPtr}{wxvariantgetvoidptr}.

\membersection{wxVariant::operator wxDateTime}\label{wxvariantdatetime}

\constfunc{void*}{operator wxDateTime}{\void}

Operator for implicit conversion to a pointer to a \helpref{wxDateTime}{wxdatetime}, using \helpref{wxVariant::GetDateTime}{wxvariantgetdatetime}.

\section{\class{wxVariantData}}\label{wxvariantdata}

The {\bf wxVariantData} is used to implement a new type for wxVariant. Derive from wxVariantData,
and override the pure virtual functions.

\wxheading{Derived from}

\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/variant.h>

\wxheading{See also}

\helpref{wxVariant}{wxvariant}

\latexignore{\rtfignore{\wxheading{Members}}}

\membersection{wxVariantData::wxVariantData}\label{wxvariantdatactor}

\func{}{wxVariantData}{\void}

Default constructor.

\membersection{wxVariantData::Copy}\label{wxvariantdatacopy}

\func{void}{Copy}{\param{wxVariantData\&}{ data}}

Copy the data from `this' object to {\it data}.

\membersection{wxVariantData::Eq}\label{wxvariantdataeq}

\constfunc{bool}{Eq}{\param{wxVariantData\&}{ data}}

Returns true if this object is equal to {\it data}.

\membersection{wxVariantData::GetType}\label{wxvariantdatagettype}

\constfunc{wxString}{GetType}{\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}}

\func{bool}{Read}{\param{wxString\&}{ string}}

Reads the data from {\it stream} or {\it string}.

\membersection{wxVariantData::Write}\label{wxvariantdatawrite}

\constfunc{bool}{Write}{\param{ostream\&}{ stream}}

\constfunc{bool}{Write}{\param{wxString\&}{ 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}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?