+wxVariant::wxVariant(const char* val, const wxString& name)
+{
+ m_data = new wxVariantDataString(wxString(val));
+ m_name = name;
+}
+
+wxVariant::wxVariant(const wchar_t* val, const wxString& name)
+{
+ m_data = new wxVariantDataString(wxString(val));
+ m_name = name;
+}
+
+wxVariant::wxVariant(const wxCStrData& val, const wxString& name)
+{
+ m_data = new wxVariantDataString(val.AsString());
+ m_name = name;
+}
+
+wxVariant::wxVariant(const wxCharBuffer& val, const wxString& name)
+{
+ m_data = new wxVariantDataString(wxString(val));
+ m_name = name;
+}
+
+wxVariant::wxVariant(const wxWCharBuffer& val, const wxString& name)
+{
+ m_data = new wxVariantDataString(wxString(val));
+ m_name = name;
+}
+
+bool wxVariant::operator== (const wxString& value) const
+{
+ wxString thisValue;
+ if (!Convert(&thisValue))
+ return false;
+
+ return value == thisValue;
+}
+
+bool wxVariant::operator!= (const wxString& value) const
+{
+ return (!((*this) == value));
+}
+
+wxVariant& wxVariant::operator= (const wxString& value)
+{
+ if (GetType() == wxT("string") &&
+ m_data->GetRefCount() == 1)
+ {
+ ((wxVariantDataString*)GetData())->SetValue(value);
+ }
+ else
+ {
+ UnRef();
+ m_data = new wxVariantDataString(value);
+ }
+ return *this;
+}
+
+wxString wxVariant::GetString() const
+{
+ wxString value;
+ if (!Convert(& value))
+ {
+ wxFAIL_MSG(wxT("Could not convert to a string"));
+ }
+
+ return value;
+}
+
+// ----------------------------------------------------------------------------
+// wxVariantDataWxObjectPtr
+// ----------------------------------------------------------------------------
+
+class wxVariantDataWxObjectPtr: public wxVariantData