+#endif
+
+/*
+ * wxVariantDataTime
+ */
+
+#if wxUSE_TIMEDATE
+
+class wxVariantDataTime: public wxVariantData
+{
+ DECLARE_DYNAMIC_CLASS(wxVariantDataTime)
+public:
+ wxVariantDataTime() { }
+ wxVariantDataTime(const wxTime& value) { m_value = value; }
+
+ inline wxTime GetValue() const { return m_value; }
+ inline void SetValue(const wxTime& value) { m_value = value; }
+
+ virtual void Copy(wxVariantData& data);
+ virtual bool Eq(wxVariantData& data) const;
+ virtual bool Write(ostream& str) const;
+ virtual bool Write(wxString& str) const;
+ virtual bool Read(istream& str);
+ virtual bool Read(wxString& str);
+ virtual wxString GetType() const { return _T("time"); };
+ virtual wxVariantData* Clone() { return new wxVariantDataTime; }
+
+protected:
+ wxTime m_value;
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxVariantDataTime, wxVariantData)
+
+void wxVariantDataTime::Copy(wxVariantData& data)
+{
+ wxASSERT_MSG( (data.GetType() == _T("time")), _T("wxVariantDataTime::Copy: Can't copy to this type of data") );
+
+ wxVariantDataTime& otherData = (wxVariantDataTime&) data;
+
+ otherData.m_value = m_value;
+}
+
+bool wxVariantDataTime::Eq(wxVariantData& data) const
+{
+ wxASSERT_MSG( (data.GetType() == _T("time")), _T("wxVariantDataTime::Eq: argument mismatch") );
+
+ wxVariantDataTime& otherData = (wxVariantDataTime&) data;
+
+ return (otherData.m_value == m_value);
+}
+
+bool wxVariantDataTime::Write(ostream& str) const
+{
+ wxString s;
+ Write(s);
+ str << (const char*) s.mb_str();
+ return TRUE;
+}
+
+bool wxVariantDataTime::Write(wxString& str) const
+{
+ wxChar*s = m_value.FormatTime();
+ str = s;
+ return TRUE;
+}
+
+bool wxVariantDataTime::Read(istream& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+
+bool wxVariantDataTime::Read(wxString& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+
+/*
+ * wxVariantDataDate
+ */
+
+class wxVariantDataDate: public wxVariantData
+{
+ DECLARE_DYNAMIC_CLASS(wxVariantDataDate)
+public:
+ wxVariantDataDate() { }
+ wxVariantDataDate(const wxDate& value) { m_value = value; }
+
+ inline wxDate GetValue() const { return m_value; }
+ inline void SetValue(const wxDate& value) { m_value = value; }
+
+ virtual void Copy(wxVariantData& data);
+ virtual bool Eq(wxVariantData& data) const;
+ virtual bool Write(ostream& str) const;
+ virtual bool Write(wxString& str) const;
+ virtual bool Read(istream& str);
+ virtual bool Read(wxString& str);
+ virtual wxString GetType() const { return _T("date"); };
+ virtual wxVariantData* Clone() { return new wxVariantDataDate; }
+
+protected:
+ wxDate m_value;
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxVariantDataDate, wxVariantData)
+
+void wxVariantDataDate::Copy(wxVariantData& data)
+{
+ wxASSERT_MSG( (data.GetType() == _T("date")), _T("wxVariantDataDate::Copy: Can't copy to this type of data") );
+
+ wxVariantDataDate& otherData = (wxVariantDataDate&) data;
+
+ otherData.m_value = m_value;
+}
+
+bool wxVariantDataDate::Eq(wxVariantData& data) const
+{
+ wxASSERT_MSG( (data.GetType() == _T("date")), _T("wxVariantDataDate::Eq: argument mismatch") );
+
+ wxVariantDataDate& otherData = (wxVariantDataDate&) data;
+
+ return (otherData.m_value == m_value);
+}
+
+bool wxVariantDataDate::Write(ostream& str) const
+{
+ wxString s;
+ Write(s);
+ str << (const char*) s.mb_str();
+ return TRUE;
+}
+
+bool wxVariantDataDate::Write(wxString& str) const
+{
+ str = m_value.FormatDate();
+ return TRUE;
+}
+
+bool wxVariantDataDate::Read(istream& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+
+bool wxVariantDataDate::Read(wxString& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+#endif
+ // wxUSE_TIMEDATE
+
+/*
+ * wxVariantDataVoidPtr
+ */
+
+class wxVariantDataVoidPtr: public wxVariantData
+{
+DECLARE_DYNAMIC_CLASS(wxVariantDataVoidPtr)
+public:
+ wxVariantDataVoidPtr() { }
+ wxVariantDataVoidPtr(void* value) { m_value = value; }
+
+ inline void* GetValue() const { return m_value; }
+ inline void SetValue(void* value) { m_value = value; }
+
+ virtual void Copy(wxVariantData& data);
+ virtual bool Eq(wxVariantData& data) const;
+ virtual bool Write(ostream& str) const;
+ virtual bool Write(wxString& str) const;
+ virtual bool Read(istream& str);
+ virtual bool Read(wxString& str);
+ virtual wxString GetType() const { return _T("void*"); };
+ virtual wxVariantData* Clone() { return new wxVariantDataVoidPtr; }
+
+protected:
+ void* m_value;
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxVariantDataVoidPtr, wxVariantData)
+
+void wxVariantDataVoidPtr::Copy(wxVariantData& data)
+{
+ wxASSERT_MSG( (data.GetType() == _T("void*")), _T("wxVariantDataVoidPtr::Copy: Can't copy to this type of data") );
+
+ wxVariantDataVoidPtr& otherData = (wxVariantDataVoidPtr&) data;
+
+ otherData.m_value = m_value;
+}
+
+bool wxVariantDataVoidPtr::Eq(wxVariantData& data) const
+{
+ wxASSERT_MSG( (data.GetType() == _T("void*")), _T("wxVariantDataVoidPtr::Eq: argument mismatch") );
+
+ wxVariantDataVoidPtr& otherData = (wxVariantDataVoidPtr&) data;
+
+ return (otherData.m_value == m_value);
+}
+
+bool wxVariantDataVoidPtr::Write(ostream& str) const
+{
+ wxString s;
+ Write(s);
+ str << (const char*) s.mb_str();
+ return TRUE;
+}
+
+bool wxVariantDataVoidPtr::Write(wxString& str) const
+{
+ str.Printf(_T("%ld"), (long) m_value);
+ return TRUE;
+}
+
+bool wxVariantDataVoidPtr::Read(istream& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+
+bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str))
+{
+ // Not implemented
+ return FALSE;
+}
+