00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_UTIL_INTERRUPT_H
00016 #define GEOS_UTIL_INTERRUPT_H
00017
00018 #include <geos/export.h>
00019
00020 namespace geos {
00021 namespace util {
00022
00023 #define GEOS_CHECK_FOR_INTERRUPTS() geos::util::Interrupt::process()
00024
00026 class GEOS_DLL Interrupt {
00027
00028 public:
00029
00030 typedef void (Callback)(void);
00031
00038 static void request();
00039
00041 static void cancel();
00042
00044 static bool check();
00045
00056 static Callback* registerCallback(Callback *cb);
00057
00062 static void process();
00063
00064
00065 static void interrupt();
00066
00067 };
00068
00069
00070 }
00071 }
00072
00073
00074 #endif // GEOS_UTIL_INTERRUPT_H