}
}
+bool wxVariant::operator== (wxObject* value) const
+{
+ return (value == ((wxVariantDataWxObjectPtr*)GetData())->GetValue());
+}
+
+bool wxVariant::operator!= (wxObject* value) const
+{
+ return (!((*this) == (void*) value));
+}
+
+void wxVariant::operator= (wxObject* value)
+{
+ if (m_data)
+ delete m_data;
+ m_data = new wxVariantDataWxObjectPtr(value);
+}
+
#if wxUSE_DATETIME
bool wxVariant::operator== (const wxDateTime& value) const
{
return (void*) ((wxVariantDataVoidPtr*) m_data)->GetValue();
}
-wxObject* wxVariant::GetWxObjectPtr()
+wxObject* wxVariant::GetWxObjectPtr() const
{
wxASSERT(wxIsKindOf(m_data, wxVariantDataWxObjectPtr));
return (wxObject*) ((wxVariantDataWxObjectPtr*) m_data)->GetValue();