|
a/src/utils/cancelcheck.h |
|
b/src/utils/cancelcheck.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _CANCELCHECK_H_INCLUDED_
|
17 |
#ifndef _CANCELCHECK_H_INCLUDED_
|
18 |
#define _CANCELCHECK_H_INCLUDED_
|
18 |
#define _CANCELCHECK_H_INCLUDED_
|
19 |
/* @(#$Id: cancelcheck.h,v 1.2 2006-01-30 11:15:28 dockes Exp $ (C) 2005 J.F.Dockes */
|
19 |
/* @(#$Id: cancelcheck.h,v 1.3 2007-07-12 13:41:54 dockes Exp $ (C) 2005 J.F.Dockes */
|
20 |
|
20 |
|
21 |
|
21 |
|
22 |
class CancelExcept {};
|
22 |
class CancelExcept {};
|
23 |
|
23 |
|
24 |
class CancelCheck {
|
24 |
class CancelCheck {
|
|
... |
|
... |
34 |
if (cancelRequested) {
|
34 |
if (cancelRequested) {
|
35 |
cancelRequested = false;
|
35 |
cancelRequested = false;
|
36 |
throw CancelExcept();
|
36 |
throw CancelExcept();
|
37 |
}
|
37 |
}
|
38 |
}
|
38 |
}
|
|
|
39 |
bool cancelState() {return cancelRequested;}
|
39 |
private:
|
40 |
private:
|
40 |
bool cancelRequested;
|
41 |
bool cancelRequested;
|
41 |
|
42 |
|
42 |
CancelCheck() : cancelRequested(false) {}
|
43 |
CancelCheck() : cancelRequested(false) {}
|
43 |
CancelCheck& operator=(CancelCheck&);
|
44 |
CancelCheck& operator=(CancelCheck&);
|