Update of /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25588/include/wxDevCenter Modified Files: Tag: modularisation language.h Frame.h MainFrame.h MDIFrame.h FileSystemStandard.h Module.h Log Message: Intend to modularize. Index: Module.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Attic/Module.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** Module.h 22 Sep 2005 16:41:35 -0000 1.1.2.2 --- Module.h 24 Sep 2005 11:44:20 -0000 1.1.2.3 *************** *** 27,63 **** #include <wxDevCenter/Manager.h> namespace wxDevCenter { - - /** Define a type manager of class info.*/ - typedef ObjectManager<wxClassInfo> ClassInfoManager; - - /** Module management.*/ class WXDC_DLL_BASE Module : public wxObject { ! DECLARE_CLASS(Module); public: ! Module(wxClassInfo* pClassInfo, ClassInfoManager* pBaseClassInfoManager); }; /** Macro to declare a module base class.*/ ! #define WXDC_DECLARE_MODULE_BASE_CLASS(BASECLASS) \ ! public:\ ! static ObjectManager<wxClassInfo> s_wxdc_ClassInfoManager;\ ! static BASECLASS* CreateDerivateClass()\ ! {\ ! if(s_wxdc_ClassInfoManager.GetCount()==0)return NULL;\ ! return (BASECLASS*) s_wxdc_ClassInfoManager[s_wxdc_ClassInfoManager.GetCount()-1].CreateObject();\ ! }\ ! protected: ! ! /** Macro to implement a module base class.*/ ! #define WXDC_IMPLEMENT_MODULE_BASE_CLASS(BASECLASS) ObjectManager<wxClassInfo> BASECLASS::s_wxdc_ClassInfoManager; ! /** Macro to automanipulate modules.*/ ! #define WXDC_DECLARE_MODULE_CLASS(CLASS, BASECLASS) static wxDevCenter::Module gs_wxdcModule(CLASSINFO(CLASS), &(BASECLASS::s_wxdc_ClassInfoManager)); } --- 27,67 ---- #include <wxDevCenter/Manager.h> + #include <wx/dynload.h> + namespace wxDevCenter { class WXDC_DLL_BASE Module : public wxObject { ! DECLARE_DYNAMIC_CLASS(Module) ! protected: ! wxClassInfo* m_pClassInfo; ! ! static Module* s_pFirst; ! Module* m_pNext; public: ! Module(); ! ! virtual void Initialize(){} ! ! static void LoadModules(); ! static void DumpClasses(); }; /** Macro to declare a module base class.*/ ! #define WXDC_DECLARE_MODULE_BASE_CLASS(CLASS)\ ! DECLARE_ABSTRACT_CLASS(CLASS) ! /** Macro to implement module class.*/ ! #define WXDC_IMPLEMENT_MODULE_BASE_CLASS(CLASS, BASECLASS) \ ! IMPLEMENT_ABSTRACT_CLASS(CLASS, BASECLASS) + /** Macro to declare module class.*/ + #define WXDC_DECLARE_MODULE_CLASS(CLASS) \ + DECLARE_DYNAMIC_CLASS(CLASS) + /** Macro to implement module class.*/ + #define WXDC_IMPLEMENT_MODULE_CLASS(CLASS, BASECLASS, INTERFACECLASS) \ + IMPLEMENT_DYNAMIC_CLASS(CLASS, BASECLASS) } Index: MainFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MainFrame.h,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -C2 -d -r1.12.2.1 -r1.12.2.2 *** MainFrame.h 22 Sep 2005 16:41:35 -0000 1.12.2.1 --- MainFrame.h 24 Sep 2005 11:44:20 -0000 1.12.2.2 *************** *** 28,35 **** #define __WXDEVCENTER_MAINFRAME ! #include <wx/dnd.h> ! #include "Frame.h" #include <wxDevCenter/FileSystemCtrl.h> class wxTreeEvent; class wxSashWindow; --- 28,37 ---- #define __WXDEVCENTER_MAINFRAME ! #include <wxDevCenter/Frame.h> ! #include <wxDevCenter/Module.h> #include <wxDevCenter/FileSystemCtrl.h> + #include <wx/dnd.h> + class wxTreeEvent; class wxSashWindow; *************** *** 46,55 **** * Fenêtre cadre contenant toutes les autres fenêtres et notament le conteneur de vues et les contrôles d'arborescence. */ ! class MainFrame : public TopFrame { /** Déclare la table d'interception des évènements de fenêtres.*/ ! DECLARE_EVENT_TABLE(); ! /** Déclare les infos RTTI de la classe.*/ ! DECLARE_DYNAMIC_CLASS(MainFrame); protected: /** LayoutManager.*/ --- 48,57 ---- * Fenêtre cadre contenant toutes les autres fenêtres et notament le conteneur de vues et les contrôles d'arborescence. */ ! class WXDC_DLL_MODULE MainFrame : public TopFrame { /** Déclare la table d'interception des évènements de fenêtres.*/ ! DECLARE_EVENT_TABLE() ! /** Déclare la classe comme implémentation d'interface de module.*/ ! DECLARE_DYNAMIC_CLASS(MainFrame) protected: /** LayoutManager.*/ Index: FileSystemStandard.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/FileSystemStandard.h,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -C2 -d -r1.14.2.1 -r1.14.2.2 *** FileSystemStandard.h 22 Sep 2005 16:41:35 -0000 1.14.2.1 --- FileSystemStandard.h 24 Sep 2005 11:44:20 -0000 1.14.2.2 *************** *** 60,65 **** { WXDC_DECLARE_MODULE_BASE_CLASS(FileSystemStandard) - DECLARE_ABSTRACT_CLASS(FileSystemStandard) public: virtual wxString GetFileSystemName()const{return WXDC_SYSTEM_STDFS_NAME;} virtual wxString GetIconName()const{return wxT("desktop");} --- 60,65 ---- { WXDC_DECLARE_MODULE_BASE_CLASS(FileSystemStandard) public: + virtual wxString GetFileSystemName()const{return WXDC_SYSTEM_STDFS_NAME;} virtual wxString GetIconName()const{return wxT("desktop");} Index: Frame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/Frame.h,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** Frame.h 22 Sep 2005 16:41:35 -0000 1.13.2.1 --- Frame.h 24 Sep 2005 11:44:20 -0000 1.13.2.2 *************** *** 138,144 **** class WXDC_DLL_BASE TopFrame : public wxFrame { - DECLARE_ABSTRACT_CLASS(TopFrame); DECLARE_EVENT_TABLE() ! WXDC_DECLARE_MODULE_BASE_CLASS(TopFrame) protected: /** Fenetre cadre fille contenant les vues.*/ --- 138,143 ---- class WXDC_DLL_BASE TopFrame : public wxFrame { DECLARE_EVENT_TABLE() ! DECLARE_DYNAMIC_CLASS(TopFrame) protected: /** Fenetre cadre fille contenant les vues.*/ *************** *** 149,152 **** --- 148,158 ---- public: + static wxClassInfo* s_pClassInfo; + static TopFrame* CreateTopFrame() + { + if(s_pClassInfo==NULL) + return NULL; + return (TopFrame*) s_pClassInfo->CreateObject(); + } /** Constructeur.*/ Index: MDIFrame.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/MDIFrame.h,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** MDIFrame.h 14 Sep 2005 14:19:10 -0000 1.7 --- MDIFrame.h 24 Sep 2005 11:44:20 -0000 1.7.2.1 *************** *** 36,40 **** class View; ! class MDIFrame : public wxNotebook, public ViewFrame { friend class DocManager; --- 36,40 ---- class View; ! class WXDC_DLL_MODULE MDIFrame : public wxNotebook, public ViewFrame { friend class DocManager; Index: language.h =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/include/wxDevCenter/language.h,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** language.h 26 Aug 2005 08:35:58 -0000 1.10 --- language.h 24 Sep 2005 11:44:20 -0000 1.10.2.1 *************** *** 191,194 **** --- 191,195 ---- #define WXDC_CMDLINE_ADDPATH_PLUGINS wxT("Add a path to search plugins") #define WXDC_CMDLINE_ADDPATH_FEATURES wxT("Add a path to search features") + #define WXDC_CMDLINE_ADDPATH_MODULE wxT("Add a path to search modules") #define WXDC_CMDLINE_ADDPATH_DATA wxT("Add a path to search data") #define WXDC_CMDLINE_ADDPATH_CONF wxT("Add a path to search config") |