diff options
Diffstat (limited to 'library/statusHandler.h')
-rw-r--r-- | library/statusHandler.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/statusHandler.h b/library/statusHandler.h index ad4cb3a0..70f8c2d8 100644 --- a/library/statusHandler.h +++ b/library/statusHandler.h @@ -21,8 +21,8 @@ public: enum Response { - CONTINUE_NEXT = -1, - RETRY = -2 + CONTINUE_NEXT = 10, + RETRY }; virtual Response reportError(const wxString& text) = 0; }; @@ -32,7 +32,7 @@ class StatusHandler { public: StatusHandler() : - abortionRequested(false) {} + abortRequested(false) {} virtual ~StatusHandler() {} //identifiers of different processes @@ -47,7 +47,7 @@ public: //these methods have to be implemented in the derived classes to handle error and status information virtual void updateStatusText(const wxString& text) = 0; virtual void initNewProcess(int objectsTotal, double dataTotal, Process processID) = 0; //informs about the total amount of data that will be processed from now on - virtual void updateProcessedData(int objectsProcessed, double dataProcessed) = 0; //called periodically after data was processed + virtual void updateProcessedData(int objectsProcessed, double dataProcessed) = 0; //called periodically after data was processed virtual ErrorHandler::Response reportError(const wxString& text) = 0; //this method is triggered repeatedly by requestUiRefresh() and can be used to refresh the ui by dispatching pending events @@ -57,19 +57,19 @@ public: if (updateUiIsAllowed()) //test if specific time span between ui updates is over forceUiRefresh(); - if (abortionRequested && !asyncProcessActive) + if (abortRequested && !asyncProcessActive) abortThisProcess(); //abort can be triggered by requestAbortion() } void requestAbortion() //opportunity to abort must be implemented in a frequently executed method like requestUiRefresh() { //currently used by the UI status information screen, when button "Abort is pressed" - abortionRequested = true; + abortRequested = true; } protected: virtual void abortThisProcess() = 0; - bool abortionRequested; + bool abortRequested; }; |