00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __HOM_InterruptableOperation_h__
00019 #define __HOM_InterruptableOperation_h__
00020
00021 #include "HOM_API.h"
00022 #include "HOM_Errors.h"
00023 #include "HOM_Module.h"
00024
00025 SWIGOUT(%feature("notabstract") HOM_InterruptableOperation;)
00026 SWIGOUT(%rename(InterruptableOperation) HOM_InterruptableOperation;)
00027
00028 class HOM_API HOM_InterruptableOperation
00029 {
00030 public:
00031
00032 #ifdef SWIG
00033 %extend
00034 {
00035 %kwargs HOM_InterruptableOperation;
00036 HOM_InterruptableOperation(const char *operation_name,
00037 const char *long_operation_name=NULL, bool open_interrupt_dialog=false)
00038 {
00039 return HOM().newInterruptableOperation(operation_name,
00040 long_operation_name, open_interrupt_dialog);
00041 }
00042 }
00043 #else
00044 HOM_InterruptableOperation()
00045 { HOM_CONSTRUCT_OBJECT(this) }
00046 HOM_InterruptableOperation(const HOM_InterruptableOperation &operation)
00047 { HOM_CONSTRUCT_OBJECT(this) }
00048 #endif
00049 virtual ~HOM_InterruptableOperation()
00050 { HOM_DESTRUCT_OBJECT(this) }
00051
00052
00053
00054 virtual std::string __repr__()
00055 throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00056
00057 SWIGOUT(%kwargs updateLongProgress;)
00058 virtual void updateLongProgress(double percentage=-1.0,
00059 const char *long_op_status=NULL)
00060 throw(HOM_OperationInterrupted, HOM_OperationFailed, HOM_Error) = 0;
00061
00062 SWIGOUT(%kwargs updateProgress;)
00063 virtual void updateProgress(double percentage=-1.0)
00064 throw(HOM_OperationInterrupted, HOM_OperationFailed, HOM_Error) = 0;
00065
00066 virtual HOM_InterruptableOperation *__enter__()
00067 throw(HOM_OperationInterrupted, HOM_Error) = 0;
00068
00069 SWIGOUT(%ignore opaqueExit;)
00070 virtual void opaqueExit()
00071 throw(HOM_OperationFailed, HOM_Error) = 0;
00072
00073 #ifdef SWIG
00074 %extend
00075 {
00076
00077 SWIGOUT(virtual void __exit__(
00078 InterpreterObject type, InterpreterObject value,
00079 InterpreterObject traceback)
00080 throw(HOM_OperationFailed, HOM_Error)
00081 { self->opaqueExit(); };)
00082 }
00083 #endif
00084
00085 };
00086
00087 #endif