#ifndef __TASK_H__ #define __TASK_H__ #ifdef __cplusplus #include "Exceptions.h" #define TASK_ON_HOLD 0 #define TASK_DONE 1 class Task : public Base { public: Task(); virtual ~Task(); virtual String GetName(); int Run(); int GetState(); int Suspend() throw (GeneralException); void Resume(int) throw (GeneralException); protected: virtual int Do(); private: int state; bool suspended; }; #else #error This only works with a C++ compiler #endif #endif