+ // wxString
+ wxVariant(const wxString& val, const wxString& name = wxEmptyString);
+ // these overloads are necessary to prevent the compiler from using bool
+ // version instead of wxString one:
+ wxVariant(const char* val, const wxString& name = wxEmptyString);
+ wxVariant(const wchar_t* val, const wxString& name = wxEmptyString);
+ wxVariant(const wxCStrData& val, const wxString& name = wxEmptyString);
+ wxVariant(const wxScopedCharBuffer& val, const wxString& name = wxEmptyString);
+ wxVariant(const wxScopedWCharBuffer& val, const wxString& name = wxEmptyString);
+
+ bool operator== (const wxString& value) const;
+ bool operator!= (const wxString& value) const;
+ wxVariant& operator=(const wxString& value);
+ // these overloads are necessary to prevent the compiler from using bool
+ // version instead of wxString one:
+ wxVariant& operator=(const char* value)
+ { return *this = wxString(value); }
+ wxVariant& operator=(const wchar_t* value)
+ { return *this = wxString(value); }
+ wxVariant& operator=(const wxCStrData& value)
+ { return *this = value.AsString(); }
+ template<typename T>
+ wxVariant& operator=(const wxScopedCharTypeBuffer<T>& value)
+ { return *this = value.data(); }
+
+ inline operator wxString () const { return MakeString(); }
+ wxString GetString() const;
+
+ // wxUniChar
+ wxVariant(const wxUniChar& val, const wxString& name = wxEmptyString);
+ wxVariant(const wxUniCharRef& val, const wxString& name = wxEmptyString);
+ wxVariant(char val, const wxString& name = wxEmptyString);
+ wxVariant(wchar_t val, const wxString& name = wxEmptyString);
+ bool operator==(const wxUniChar& value) const;
+ bool operator==(const wxUniCharRef& value) const { return *this == wxUniChar(value); }
+ bool operator==(char value) const { return *this == wxUniChar(value); }
+ bool operator==(wchar_t value) const { return *this == wxUniChar(value); }
+ bool operator!=(const wxUniChar& value) const { return !(*this == value); }
+ bool operator!=(const wxUniCharRef& value) const { return !(*this == value); }
+ bool operator!=(char value) const { return !(*this == value); }
+ bool operator!=(wchar_t value) const { return !(*this == value); }
+ wxVariant& operator=(const wxUniChar& value);
+ wxVariant& operator=(const wxUniCharRef& value) { return *this = wxUniChar(value); }
+ wxVariant& operator=(char value) { return *this = wxUniChar(value); }
+ wxVariant& operator=(wchar_t value) { return *this = wxUniChar(value); }
+ operator wxUniChar() const { return GetChar(); }
+ operator char() const { return GetChar(); }
+ operator wchar_t() const { return GetChar(); }
+ wxUniChar GetChar() const;
+
+ // wxArrayString
+ wxVariant(const wxArrayString& val, const wxString& name = wxEmptyString);
+ bool operator== (const wxArrayString& value) const;
+ bool operator!= (const wxArrayString& value) const;
+ void operator= (const wxArrayString& value);
+ operator wxArrayString () const { return GetArrayString(); }
+ wxArrayString GetArrayString() const;
+
+ // void*
+ wxVariant(void* ptr, const wxString& name = wxEmptyString);
+ bool operator== (void* value) const;
+ bool operator!= (void* value) const;
+ void operator= (void* value);
+ operator void* () const { return GetVoidPtr(); }
+ void* GetVoidPtr() const;
+
+ // wxObject*
+ wxVariant(wxObject* ptr, const wxString& name = wxEmptyString);
+ bool operator== (wxObject* value) const;
+ bool operator!= (wxObject* value) const;
+ void operator= (wxObject* value);
+ wxObject* GetWxObjectPtr() const;
+
+
+ // ------------------------------
+ // list operations
+ // ------------------------------
+
+ wxVariant(const wxVariantList& val, const wxString& name = wxEmptyString); // List of variants
+ bool operator== (const wxVariantList& value) const;
+ bool operator!= (const wxVariantList& value) const;
+ void operator= (const wxVariantList& value) ;
+ // Treat a list variant as an array
+ wxVariant operator[] (size_t idx) const;
+ wxVariant& operator[] (size_t idx) ;
+ wxVariantList& GetList() const ;
+
+ // Return the number of elements in a list
+ size_t GetCount() const;