- MSG_WORKER_THREAD_UNIT_TICK = 7504,
- MSG_WORKER_THREAD_DONE = 7505,
- MSG_WORKER_THREAD_FAIL = 7506, // sent by workers when they fail
- };
-
- BackgroundSupervisor()
- : m_bDone(false), wxEvtHandler()
- {}
-
- virtual ~BackgroundSupervisor()
- {}
-
- virtual bool start() = 0;
- virtual bool testDone() = 0;
- virtual void OnWorkerFail(wxCommandEvent& event) = 0;
- virtual void OnWorkerUnitTick(wxCommandEvent& event) = 0;
- virtual void OnWorkerDone(wxCommandEvent& event) = 0;
- virtual void OnCancel(wxCommandEvent& event) = 0;
-
- bool isDone() const {return m_bDone;}
- void setDone() { m_bDone = true; }
-
- static void cancelSupervisor (BackgroundSupervisor* pSupervisor);