-
- // Implicit conversion to a wxString
- inline operator wxString () const { return MakeString(); }
- wxString MakeString() const;
-
- // Other implicit conversions
- inline operator double () const { return GetDouble(); }
- inline operator char () const { return GetChar(); }
- inline operator long () const { return GetLong(); }
- inline operator bool () const { return GetBool(); }
-#if wxUSE_TIMEDATE
- inline operator wxTime () const { return GetTime(); }
- inline operator wxDate () const { return GetDate(); }
-#endif
- inline operator void* () const { return GetVoidPtr(); }
-
-// Accessors
- // Sets/gets name
- inline void SetName(const wxString& name) { m_name = name; }
- inline const wxString& GetName() const { return m_name; }
-
- // Tests whether there is data
- inline bool IsNull() const { return (m_data == (wxVariantData*) NULL); }
-
- wxVariantData* GetData() const { return m_data; }
- void SetData(wxVariantData* data) ;
-
- // Returns a string representing the type of the variant,
- // e.g. "string", "bool", "stringlist", "list", "double", "long"
- wxString GetType() const;
-
- bool IsType(const wxString& type) const;
-
- // Return the number of elements in a list
- int GetCount() const;
-
-// Value accessors
- double GetReal() const ;
- inline double GetDouble() const { return GetReal(); };
- long GetInteger() const ;
- inline long GetLong() const { return GetInteger(); };
- char GetChar() const ;
- bool GetBool() const ;
- wxString GetString() const ;