+ @section variant_wxanyconversion wxVariant to wxAny Conversion Layer
+
+ wxAny is a more modern, template-based variant class. It is not
+ directly compatible with wxVariant, but there is a transparent conversion
+ layer.
+
+ Following is an example how to use these conversions with wxPropertyGrid's
+ property class wxPGProperty (which currently uses wxVariants both
+ internally and in the public API):
+
+ @code
+ // Get property value as wxAny instead of wxVariant
+ wxAny value = property->GetValue();
+
+ // Do something with it
+ DoSomethingWithString(value.As<wxString>());
+
+ // Write back new value to property
+ value = "New Value";
+ property->SetValue(value);
+
+ @endcode
+
+ Some caveats:
+ @li In wxAny, there are no separate types for handling integers of
+ different sizes, so converting wxAny with 'long long' value
+ will yield wxVariant of "long" type when the value is small
+ enough to fit in without overflow. Otherwise, variant type
+ "longlong" is used. Also note that wxAny holding unsigned integer
+ will always be converted to "ulonglong" wxVariant type.
+
+ @li Unlike wxVariant, wxAny does not store a (rarely needed) name string.
+
+ @li Because of implicit conversion of wxVariant to wxAny, wxAny cannot
+ usually contain value of type wxVariant. In other words,
+ any.CheckType<wxVariant>() can never return @true.
+
+ Supplied conversion functions will automatically work with all
+ built-in wxVariant types, and also with all user-specified types generated
+ using IMPLEMENT_VARIANT_OBJECT(). For hand-built wxVariantData classes,
+ you will need to use supplied macros in a following manner:
+
+ @code
+
+ // Declare wxVariantData for data type Foo
+ class wxVariantDataFoo: public wxVariantData
+ {
+ public:
+ // interface
+ // ...
+
+ DECLARE_WXANY_CONVERSION()
+ protected:
+ // data storage etc
+ // ...
+ };
+
+ IMPLEMENT_TRIVIAL_WXANY_CONVERSION(Foo, wxVariantDataFoo)
+
+ @endcode
+