-#define _DECLARE_DYNAMIC_CLASS(name) \
- public: \
- static wxClassInfo sm_class##name; \
- static const wxClassInfo* sm_classParents##name[] ; \
- static const wxPropertyInfo* GetPropertiesStatic() ; \
- static const wxHandlerInfo* GetHandlersStatic() ; \
- virtual wxClassInfo *GetClassInfo() const \
- { return &name::sm_class##name; }
-
-#define DECLARE_DYNAMIC_CLASS(name) \
- _DECLARE_DYNAMIC_CLASS(name) \
- static wxConstructorBridge* sm_constructor##name ; \
- static const wxChar * sm_constructorProperties##name[] ; \
- static const int sm_constructorPropertiesCount##name ;
-
-#define DECLARE_DYNAMIC_CLASS_NO_ASSIGN(name) \
- DECLARE_NO_ASSIGN_CLASS(name) \
- DECLARE_DYNAMIC_CLASS(name)
-
-#define DECLARE_DYNAMIC_CLASS_NO_COPY(name) \
- DECLARE_NO_COPY_CLASS(name) \
- DECLARE_DYNAMIC_CLASS(name)
-
-#define DECLARE_ABSTRACT_CLASS(name) _DECLARE_DYNAMIC_CLASS(name)
-#define DECLARE_CLASS(name) DECLARE_DYNAMIC_CLASS(name)
-
-// -----------------------------------
-// for concrete classes
-// -----------------------------------
-
- // Single inheritance with one base class
-
-#define _IMPLEMENT_DYNAMIC_CLASS(name, basename, unit) \
- wxObject* wxConstructorFor##name() \
- { return new name; } \
- const wxClassInfo* name::sm_classParents##name[] = { &basename::sm_class##basename ,NULL } ; \
- wxObject* wxVariantToObjectConverter##name ( const wxxVariant &data ) { return data.Get<name*>() ; } \
- wxxVariant wxObjectToVariantConverter##name ( wxObject *data ) { return wxxVariant( dynamic_cast<name*> (data) ) ; } \
- wxClassInfo name::sm_class##name(sm_classParents##name , wxT(unit) , wxT(#name), \
- (int) sizeof(name), \
- (wxObjectConstructorFn) wxConstructorFor##name , \
- name::GetPropertiesStatic(),name::GetHandlersStatic(),name::sm_constructor##name , name::sm_constructorProperties##name , \
- name::sm_constructorPropertiesCount##name , wxVariantToObjectConverter##name , wxObjectToVariantConverter##name); \
- template<> void wxStringReadValue(const wxString & , name * & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") ) ;}\
- template<> void wxStringWriteValue(wxString & , name* const & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> const wxTypeInfo* wxGetTypeInfo( name ** ){ static wxClassTypeInfo s_typeInfo(&name::sm_class##name) ; return &s_typeInfo ; }
-
-#define IMPLEMENT_DYNAMIC_CLASS( name , basename ) \
-_IMPLEMENT_DYNAMIC_CLASS( name , basename , "" ) \
-const wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } \
-const wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \
-WX_CONSTRUCTOR_DUMMY( name )
-
-#define IMPLEMENT_DYNAMIC_CLASS_XTI( name , basename , unit ) \
-_IMPLEMENT_DYNAMIC_CLASS( name , basename , unit )
-
-// this is for classes that do not derive from wxobject, there are no creators for these
-
-#define IMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_NO_BASE_XTI( name , unit ) \
- const wxClassInfo* name::sm_classParents##name[] = { NULL } ; \
- wxClassInfo name::sm_class##name(sm_classParents##name , wxT("") , wxT(#name), \
- (int) sizeof(name), \
- (wxObjectConstructorFn) 0 , \
- name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \
- 0 , 0 , 0 ); \
- template<> void wxStringReadValue(const wxString & , name * & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> void wxStringWriteValue(wxString & , name* const & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> const wxTypeInfo* wxGetTypeInfo( name ** ){ static wxClassTypeInfo s_typeInfo(&name::sm_class##name) ; return &s_typeInfo ; }
-
-// this is for subclasses that still do not derive from wxobject
-
-#define IMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_XTI( name , basename, unit ) \
- const wxClassInfo* name::sm_classParents##name[] = { &basename::sm_class##basename ,NULL } ; \
- wxClassInfo name::sm_class##name(sm_classParents##name , wxT("") , wxT(#name), \
- (int) sizeof(name), \
- (wxObjectConstructorFn) 0 , \
- name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \
- 0 , 0 , 0 ); \
- template<> void wxStringReadValue(const wxString & , name * & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> void wxStringWriteValue(wxString & , name* const & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> const wxTypeInfo* wxGetTypeInfo( name ** ){ static wxClassTypeInfo s_typeInfo(&name::sm_class##name) ; return &s_typeInfo ; }
-
- // Multiple inheritance with two base classes
-
-#define _IMPLEMENT_DYNAMIC_CLASS2(name, basename, basename2, unit) \
- wxObject* wxConstructorFor##name() \
- { return new name; } \
- const wxClassInfo* name::sm_classParents##name[] = { &basename::sm_class##basename ,&basename2::sm_class##basename2 , NULL } ; \
- wxObject* wxVariantToObjectConverter##name ( const wxxVariant &data ) { return data.Get<name*>() ; } \
- wxxVariant wxObjectToVariantConverter##name ( wxObject *data ) { return wxxVariant( dynamic_cast<name*> (data) ) ; } \
- wxClassInfo name::sm_class##name(sm_classParents##name , wxT(unit) , wxT(#name), \
- (int) sizeof(name), \
- (wxObjectConstructorFn) wxConstructorFor##name , \
- name::GetPropertiesStatic(),name::GetHandlersStatic(),name::sm_constructor##name , name::sm_constructorProperties##name , \
- name::sm_constructorPropertiesCount##name , wxVariantToObjectConverter##name , wxObjectToVariantConverter##name); \
- template<> void wxStringReadValue(const wxString & , name * & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> void wxStringWriteValue(wxString & , name* const & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> const wxTypeInfo* wxGetTypeInfo( name ** ){ static wxClassTypeInfo s_typeInfo(&name::sm_class##name) ; return &s_typeInfo ; }
-
-#define IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2) \
-_IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2 , "") \
-const wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } \
-const wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \
-WX_CONSTRUCTOR_DUMMY( name )
-
-#define IMPLEMENT_DYNAMIC_CLASS2_XTI( name , basename , basename2, unit) \
- _IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2 , unit)
-
-// -----------------------------------
-// for abstract classes
-// -----------------------------------
-
- // Single inheritance with one base class
-
-#define _IMPLEMENT_ABSTRACT_CLASS(name, basename) \
- const wxClassInfo* name::sm_classParents##name[] = { &basename::sm_class##basename ,NULL } ; \
- wxObject* wxVariantToObjectConverter##name ( const wxxVariant &data ) { return data.Get<name*>() ; } \
- wxxVariant wxObjectToVariantConverter##name ( wxObject *data ) { return wxxVariant( dynamic_cast<name*> (data) ) ; } \
- wxClassInfo name::sm_class##name(sm_classParents##name , wxT("") , wxT(#name), \
- (int) sizeof(name), \
- (wxObjectConstructorFn) 0 , \
- name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \
- 0 , wxVariantToObjectConverter##name , wxObjectToVariantConverter##name); \
- template<> void wxStringReadValue(const wxString & , name * & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> void wxStringWriteValue(wxString & , name* const & ){wxASSERT_MSG( 0 , wxT("Illegal Spezialication Called") );}\
- template<> const wxTypeInfo* wxGetTypeInfo( name ** ){ static wxClassTypeInfo s_typeInfo(&name::sm_class##name) ; return &s_typeInfo ; }
-
-#define IMPLEMENT_ABSTRACT_CLASS( name , basename ) \
-_IMPLEMENT_ABSTRACT_CLASS( name , basename ) \
-const wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \
-const wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; }
-
- // Multiple inheritance with two base classes
-
-#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \
- wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename1), \
- wxT(#basename2), (int) sizeof(name), \
- (wxObjectConstructorFn) 0);
-
-#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS
-#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2
-
-#endif
\ No newline at end of file