ProblemPanelFactory.h

00001 
00004 #ifndef _ProblemPanelFactory_h
00005 #define _ProblemPanelFactory_h
00006 
00007 // SYSTEM INCLUDES
00008 //
00009 #include <map>
00010 
00011 // PROJECT INCLUDES
00012 //
00013 #include <wx/panel.h>
00014 
00015 // LOCAL INCLUDES
00016 //
00017 #include "../ProblemBase.h"
00018 
00019 // FORWARD REFERENCES
00020 //
00021 
00022 
00023 class ProblemPanelFactory
00024 {
00025 public:
00031     typedef wxPanel*(*PanelCreator)(ProblemBase* pProblem, wxWindow* pParent);
00032 
00033 // LIFECYCLE
00034 
00037     ~ProblemPanelFactory(void);
00038 
00039 
00040 // OPERATORS
00041 // OPERATIONS
00042 
00048     void*                   Register(ProblemIdType id, PanelCreator function);
00049 
00052     wxPanel*                CreatePanel(ProblemBase*        pProblem,
00053                                         wxWindow*           pParent) const;
00054 
00057     wxSize                  MinSize();
00058 
00059 // ACCESS
00060 
00063     static ProblemPanelFactory& GetInstance();
00064 
00065 // INQUIRY
00066 
00067 protected:
00068 private:
00071     ProblemPanelFactory(void);
00072 
00073     map<ProblemIdType, PanelCreator>  mFactories;
00074 };
00075 
00076 // INLINE METHODS
00077 //
00078 
00079 // EXTERNAL REFERENCES
00080 //
00081 
00082 #endif  // _ProblemPanelFactory_h

Wygenerowano Fri Sep 29 21:04:49 2006 dla EduOptim2 programem  doxygen 1.4.6