]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/variant.h
support SDK < 10.6, fixes #14902
[wxWidgets.git] / include / wx / variant.h
index f3b1aca1add8609933a46768a783ae95d9bc2800..318a483144a81c0441a349632a8a46c8d53b110d 100644 (file)
@@ -362,6 +362,24 @@ public:
 #if wxUSE_LONGLONG
     bool Convert(wxLongLong* value) const;
     bool Convert(wxULongLong* value) const;
 #if wxUSE_LONGLONG
     bool Convert(wxLongLong* value) const;
     bool Convert(wxULongLong* value) const;
+  #ifdef wxLongLong_t
+    bool Convert(wxLongLong_t* value) const
+    {
+        wxLongLong temp;
+        if ( !Convert(&temp) )
+            return false;
+        *value = temp.GetValue();
+        return true;
+    }
+    bool Convert(wxULongLong_t* value) const
+    {
+        wxULongLong temp;
+        if ( !Convert(&temp) )
+            return false;
+        *value = temp.GetValue();
+        return true;
+    }
+  #endif // wxLongLong_t
 #endif // wxUSE_LONGLONG
 
 // Attributes
 #endif // wxUSE_LONGLONG
 
 // Attributes
@@ -444,9 +462,6 @@ wxVariantData* CLASSNAME::VariantDataFactory(const wxAny& any) \
 } \
 REGISTER_WXANY_CONVERSION(T, CLASSNAME)
 
 } \
 REGISTER_WXANY_CONVERSION(T, CLASSNAME)
 
-// This is needed for wxVariantList conversion
-WX_DECLARE_LIST_WITH_DECL(wxAny, wxAnyList, class WXDLLIMPEXP_BASE);
-
 #else // if !wxUSE_ANY
 
 #define DECLARE_WXANY_CONVERSION()
 #else // if !wxUSE_ANY
 
 #define DECLARE_WXANY_CONVERSION()
@@ -555,7 +570,11 @@ bool classname##VariantData::Eq(wxVariantData& data) const \
                   var.GetWxObjectPtr() : NULL));
 
 // Replacement for using wxDynamicCast on a wxVariantData object
                   var.GetWxObjectPtr() : NULL));
 
 // Replacement for using wxDynamicCast on a wxVariantData object
-#define wxDynamicCastVariantData(data, classname) dynamic_cast<classname*>(data)
+#ifndef wxNO_RTTI
+    #define wxDynamicCastVariantData(data, classname) dynamic_cast<classname*>(data)
+#endif
+
+#define wxStaticCastVariantData(data, classname) static_cast<classname*>(data)
 
 extern wxVariant WXDLLIMPEXP_BASE wxNullVariant;
 
 
 extern wxVariant WXDLLIMPEXP_BASE wxNullVariant;