00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __mitkProcessObject_h
00012 #define __mitkProcessObject_h
00013
00014 #include "mitkObject.h"
00015
00020 class MITK_COMMON_API mitkProcessObject : public mitkObject
00021 {
00022 public:
00023 MITK_TYPE(mitkProcessObject,mitkObject)
00024
00025 virtual void PrintSelf(ostream& os);
00026
00027 bool Run();
00028
00029 void SetStartMethod(void (* f) (void *)) {m_StartMethod = f;}
00030 void SetEndMethod(void (* f) (void *)){m_EndMethod = f;}
00031 void SetProgressMethod(void (* f) (void *)){m_ProgressMethod = f;}
00032
00037 unsigned long GetProgressRate() { return m_ProgressRate; }
00038
00043 void SetProgressRateMax(unsigned long m) { m_ProgressRateMax = m; }
00044
00045
00046 void SetProgressRate(unsigned int rate) { m_ProgressRate = rate; }
00047 unsigned int GetProgressRateMax() { return m_ProgressRateMax; }
00048 void UpdateObservers() { this->_updateObservers(); }
00049
00050 protected:
00051 virtual ~mitkProcessObject();
00052 mitkProcessObject();
00053
00054 virtual bool Execute() { return true; }
00055
00056 unsigned long m_ProgressRate;
00057 unsigned long m_ProgressRateMax;
00058
00059 private:
00060 void (* m_StartMethod) (void *);
00061 void (* m_EndMethod) (void *);
00062 void (* m_ProgressMethod) (void *);
00063
00064 mitkProcessObject(const mitkProcessObject&);
00065 void operator=(const mitkProcessObject&);
00066 };
00067
00068
00069
00070
00071
00072
00073 #endif
00074
00075