- return (!(*this == variant));
-}
-
-
-// Specific operators
-bool wxVariant::operator== (double value) const
-{
- double thisValue;
- if (!Convert(&thisValue))
- return FALSE;
- else
- return (value == thisValue);
-}
-
-bool wxVariant::operator!= (double value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (double value)
-{
- if (GetType() == wxT("double"))
- {
- ((wxVariantDataReal*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataReal(value);
- }
-}
-
-bool wxVariant::operator== (long value) const
-{
- long thisValue;
- if (!Convert(&thisValue))
- return FALSE;
- else
- return (value == thisValue);
-}
-
-bool wxVariant::operator!= (long value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (long value)
-{
- if (GetType() == wxT("long"))
- {
- ((wxVariantDataLong*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataLong(value);
- }
-}
-
-bool wxVariant::operator== (char value) const
-{
- char thisValue;
- if (!Convert(&thisValue))
- return FALSE;
- else
- return (value == thisValue);
-}
-
-bool wxVariant::operator!= (char value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (char value)
-{
- if (GetType() == wxT("char"))
- {
- ((wxVariantDataChar*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataChar(value);
- }
-}
-
-#ifdef HAVE_BOOL
-bool wxVariant::operator== (bool value) const
-{
- bool thisValue;
- if (!Convert(&thisValue))
- return FALSE;
- else
- return (value == thisValue);
-}
-
-bool wxVariant::operator!= (bool value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (bool value)
-{
- if (GetType() == wxT("bool"))
- {
- ((wxVariantDataBool*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataBool(value);
- }
-}
-#endif // HAVE_BOOL
-
-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));
-}
-
-void wxVariant::operator= (const wxString& value)
-{
- if (GetType() == wxT("string"))
- {
- ((wxVariantDataString*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataString(value);
- }
-}
-
-void wxVariant::operator= (const wxChar* value)
-{
- if (GetType() == wxT("string"))
- {
- ((wxVariantDataString*)GetData())->SetValue(wxString(value));
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataString(wxString(value));
- }
-}
-
-bool wxVariant::operator== (const wxStringList& value) const
-{
- wxASSERT_MSG( (GetType() == wxT("stringlist")), wxT("Invalid type for == operator") );
-
- wxVariantDataStringList other(value);
- return (m_data->Eq(other));
-}
-
-bool wxVariant::operator!= (const wxStringList& value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxStringList& value)
-{
- if (GetType() == wxT("stringlist"))
- {
- ((wxVariantDataStringList*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataStringList(value);
- }
-}
-
-bool wxVariant::operator== (const wxList& value) const
-{
- wxASSERT_MSG( (GetType() == wxT("list")), wxT("Invalid type for == operator") );
-
- wxVariantDataList other(value);
- return (m_data->Eq(other));
-}
-
-bool wxVariant::operator!= (const wxList& value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxList& value)
-{
- if (GetType() == wxT("list"))
- {
- ((wxVariantDataList*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataList(value);
- }
-}
-
-// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
-#if wxUSE_TIMEDATE && !defined(__WATCOMC__)
-bool wxVariant::operator== (const wxTime& value) const
-{
- wxTime thisValue;
- if (!Convert(&thisValue))
- return FALSE;
-
- return value == thisValue;
-}
-
-bool wxVariant::operator!= (const wxTime& value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxTime& value)
-{
- if (GetType() == wxT("time"))
- {
- ((wxVariantDataTime*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataTime(value);
- }
-}
-
-bool wxVariant::operator== (const wxDate& value) const
-{
- wxDate thisValue;
- if (!Convert(&thisValue))
- return FALSE;
-
- return (value == thisValue);
-}
-
-bool wxVariant::operator!= (const wxDate& value) const
-{
- return (!((*this) == value));
-}
-
-void wxVariant::operator= (const wxDate& value)
-{
- if (GetType() == wxT("date"))
- {
- ((wxVariantDataTime*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataDate(value);
- }
-}
-#endif
-
-bool wxVariant::operator== (void* value) const
-{
- return (value == ((wxVariantDataVoidPtr*)GetData())->GetValue());
-}
-
-bool wxVariant::operator!= (void* value) const
-{
- return (!((*this) == (void*) value));
-}
-
-void wxVariant::operator= (void* value)
-{
- if (GetType() == wxT("void*"))
- {
- ((wxVariantDataVoidPtr*)GetData())->SetValue(value);
- }
- else
- {
- if (m_data)
- delete m_data;
- m_data = new wxVariantDataVoidPtr(value);
- }