Contents Up Previous Next

wxVariantData

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

Derived from

wxObject

Include files

<wx/variant.h>

See also

wxVariant

Members

wxVariantData::wxVariantData
wxVariantData::Copy
wxVariantData::Eq
wxVariantData::GetType
wxVariantData::GetValueClassInfo
wxVariantData::Read
wxVariantData::Write
wxGetVariantCast


wxVariantData::wxVariantData

wxVariantData()

Default constructor.


wxVariantData::Copy

void Copy(wxVariantData& data)

Copy the data from 'this' object to data.


wxVariantData::Eq

bool Eq(wxVariantData& data) const

Returns true if this object is equal to data.


wxVariantData::GetType

wxString GetType() const

Returns the string type of the data.


wxVariantData::GetValueClassInfo

wxClassInfo* GetValueClassInfo() const

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.


wxVariantData::Read

bool Read(ostream& stream)

bool Read(wxString& string)

Reads the data from stream or string.


wxVariantData::Write

bool Write(ostream& stream) const

bool Write(wxString& string) const

Writes the data to stream or string.


wxGetVariantCast

classname * wxGetVariantCast(wxVariant&, classname)

This macro returns the data stored in variant cast to the type classname * if the data is of this type (the check is done during the run-time) or NULL otherwise.

See also

RTTI overview
wxDynamicCast