// Author: Jaakko Salli
// Modified by:
// Created: 07/05/2009
-// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
if ( any.GetAs(&ll) )
{
// NB: Do not use LONG_MAX here. Explicitly using 32-bit
- // integer constraint yields more consistent behavior across
+ // integer constraint yields more consistent behaviour across
// builds.
if ( ll > wxINT32_MAX || ll < wxINT32_MIN )
*variant = wxLongLong(ll);
else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) )
{
double value2;
- if ( !value.ToDouble(&value2) )
+ if ( !value.ToCDouble(&value2) )
return false;
wxAnyValueTypeImplDouble::SetValue(value2, dst);
}
}
else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) )
{
- wxString s = wxString::Format(wxS("%.14g"), value);
+ wxString s = wxString::FromCDouble(value, 14);
wxAnyValueTypeImpl<wxString>::SetValue(s, dst);
}
else
WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstCharPtr)
WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstWchar_tPtr)
+#if wxUSE_DATETIME
WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxDateTime>)
+#endif // wxUSE_DATETIME
+
//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxObject*>)
//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxArrayString>)
class wxAnyNullValue
{
-private:
+protected:
+ // this field is unused, but can't be private to avoid Clang's
+ // "Private field 'm_dummy' is not used" warning
void* m_dummy;
};
return false;
}
+#if wxUSE_EXTENDED_RTTI
+ virtual const wxTypeInfo* GetTypeInfo() const
+ {
+ wxFAIL_MSG("Null Type Info not available");
+ return NULL;
+ }
+#endif
+
private:
};
wxAnyValueType* wxAnyNullValueType =
wxAnyValueTypeImpl<wxAnyNullValue>::GetInstance();
+#include "wx/listimpl.cpp"
+WX_DEFINE_LIST(wxAnyList)
+
#endif // wxUSE_ANY