-
- // 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(); }
- inline operator void* () const { return GetVoidPtr(); }
- // No implicit conversion to wxObject, as that would really
- // confuse people between conversion to our contained data
- // and downcasting to see our base type.
-//TODO: Need to document
-#if wxUSE_DATETIME
- inline operator wxDateTime () const { return GetDateTime(); }
-#endif // wxUSE_DATETIME
-//TODO: End of Need to document
-
-// 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;
- bool IsValueKindOf(const wxClassInfo* 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 ;