public: \
wxINFUNC_CLASS_TYPE_FIX(Klass) \
wxSetter##property() : wxSetter( wxT(#setterMethod) ) {} \
- ~wxSetter##property() {} \
+ virtual ~wxSetter##property() {} \
void Set( wxObject *object, const wxxVariant &variantValue ) const \
{ \
Klass *obj = dynamic_cast<Klass*>(object) ; \
public : \
wxINFUNC_CLASS_TYPE_FIX(Klass) \
wxGetter##property() : wxGetter( wxT(#gettermethod) ) {} \
- ~wxGetter##property() {} \
+ virtual ~wxGetter##property() {} \
void Get( const wxObject *object , wxxVariant &result) const \
{ \
const Klass *obj = dynamic_cast<const Klass*>(object) ; \
public: \
wxINFUNC_CLASS_TYPE_FIX(Klass) \
wxAdder##property() : wxAdder( wxT(#addermethod) ) {} \
- ~wxAdder##property() {} \
+ virtual ~wxAdder##property() {} \
void Add( wxObject *object, const wxxVariant &variantValue ) const \
{ \
Klass *obj = dynamic_cast<Klass*>(object) ; \
public : \
wxINFUNC_CLASS_TYPE_FIX(Klass) \
wxCollectionGetter##property() : wxCollectionGetter( wxT(#gettermethod) ) {} \
- ~wxCollectionGetter##property() {} \
+ virtual ~wxCollectionGetter##property() {} \
void Get( const wxObject *object , wxxVariantArray &result) const \
{ \
const Klass *obj = dynamic_cast<const Klass*>(object) ; \
{
public :
wxGenericPropertyAccessor( const wxString &propName ) ;
- ~wxGenericPropertyAccessor() ;
+ virtual ~wxGenericPropertyAccessor() ;
void RenameProperty( const wxString& WXUNUSED_UNLESS_DEBUG(oldName),
const wxString& newName )
const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) , wxT(#v1) , wxT(#v2) } ; \
const int klass::ms_constructorPropertiesCount = 3 ;
+// direct constructor version
+
+template<typename Class,
+typename T0, typename T1, typename T2>
+struct wxDirectConstructorBridge_3 : public wxDirectConstructorBrigde
+{
+ void Create(wxObject * &o, wxxVariant *args)
+ {
+ o = new Class(
+ args[0].wxTEMPLATED_MEMBER_CALL(Get , T0) ,
+ args[1].wxTEMPLATED_MEMBER_CALL(Get , T1) ,
+ args[2].wxTEMPLATED_MEMBER_CALL(Get , T2)
+ );
+ }
+};
+
+#define wxDIRECT_CONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \
+ wxDirectConstructorBridge_3<klass,t0,t1,t2> constructor##klass ; \
+ wxConstructorBridge* klass::ms_constructor = &constructor##klass ; \
+ const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) , wxT(#v1) , wxT(#v2) } ; \
+ const int klass::ms_constructorPropertiesCount = 3;
+
// 4 params
template<typename Class,