X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bca6bd3823b9e2ca8200e2c0a4fa8d15bb1d5c9a..49a63afbad7646668df343d29edd88458bc7e0a9:/include/wx/xti2.h diff --git a/include/wx/xti2.h b/include/wx/xti2.h index 5786a86f93..d5162c1eaf 100644 --- a/include/wx/xti2.h +++ b/include/wx/xti2.h @@ -18,6 +18,10 @@ #if wxUSE_EXTENDED_RTTI +// ---------------------------------------------------------------------------- +// wxDynamicObject class, its instances connect to a 'super class instance' +// ---------------------------------------------------------------------------- + class WXDLLIMPEXP_BASE wxDynamicObject : public wxObject { friend class WXDLLIMPEXP_FWD_BASE wxDynamicClassInfo ; @@ -57,6 +61,27 @@ private : wxDynamicObjectInternal *m_data; }; +// ---------------------------------------------------------------------------- +// String conversion templates supporting older compilers +// ---------------------------------------------------------------------------- + +#if wxUSE_FUNC_TEMPLATE_POINTER +# define wxTO_STRING(type) wxToStringConverter +# define wxTO_STRING_IMP(type) +# define wxFROM_STRING(type) wxFromStringConverter +# define wxFROM_STRING_IMP(type) +#else +# define wxTO_STRING(type) ToString##type +# define wxTO_STRING_IMP(type) \ + inline void ToString##type( const wxAny& data, wxString &result ) \ +{ wxToStringConverter(data, result); } + +# define wxFROM_STRING(type) FromString##type +# define wxFROM_STRING_IMP(type) \ + inline void FromString##type( const wxString& data, wxAny &result ) \ +{ wxFromStringConverter(data, result); } +#endif + #include "wx/xtiprop.h" #include "wx/xtictor.h" @@ -224,7 +249,8 @@ wxObject* wxVariantOfPtrToObjectConverter##name ( const wxAny &data ) \ wxT(#basename2), (int) sizeof(name), \ (wxObjectConstructorFn) 0); -// templated streaming, every type must have their specialization for these methods +// templated streaming, every type that can be converted to wxString +// must have their specialization for these methods template void wxStringReadValue( const wxString &s, T &data );