X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadrecon.h;fp=src%2Fthreadrecon.h;h=ae6f0d27bd8edbb6575cf1e9208d1c271fa31341;hp=0cb8c9a3c584c7070f82d64d84d84049912d71db;hb=9776c9a12ba53419d34563a5ec57c90e3d6798f4;hpb=e081109a4a541c8780aaa253b874acada5957200 diff --git a/src/threadrecon.h b/src/threadrecon.h index 0cb8c9a..ae6f0d2 100644 --- a/src/threadrecon.h +++ b/src/threadrecon.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadrecon.h,v 1.2 2001/02/22 15:00:20 kevin Exp $ +** $Id: threadrecon.h,v 1.3 2001/02/22 18:22:40 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -35,9 +35,12 @@ class BackgroundTask : public wxEvtHandler { +private: + bool m_bDone; + public: BackgroundTask() - : wxEvtHandler() + : m_bDone(false), wxEvtHandler() {} virtual ~BackgroundTask() @@ -45,6 +48,10 @@ public: virtual void cancel() = 0; virtual bool start() = 0; + virtual bool testDone() = 0; + + bool isDone() const {return m_bDone;} + void setDone() { m_bDone = true; } }; class Reconstructor; @@ -71,12 +78,11 @@ private: volatile int m_iRunning; volatile unsigned int m_iViewsDone; volatile unsigned int m_iTotalViews; - wxCriticalSection m_criticalSection; + //wxCriticalSection m_criticalSection; wxString m_strLabel; Timer* m_pTimer; bool m_bCancelled; bool m_bCancelling; - bool m_bDone; public: ThreadedReconstructor (ProjectionFileView* pProjView, @@ -91,15 +97,15 @@ public: ~ThreadedReconstructor (); void OnThreadEvent (wxCommandEvent& event); - bool testDone(); void cancel(); void onDone(); bool start(); bool fail() const {return m_bFail;} - bool getDone() const {return m_bDone;} + bool testDone(); + void cleanUp(); - ImageFile* getImageFile() const; + ImageFile* getImageFile(); DECLARE_EVENT_TABLE() };