1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include "scan_common.h"
- class CBaseTask{
- public:
- virtual void run(){}
- };
- class CTestWorker:public IService
- {
- public:
- CTestWorker(void);
- ~CTestWorker(void);
- bool isBusy(){
- return m_isBusy;
- }
- void addTask(CBaseTask * task){
- m_task =task;
- m_isBusy =true;
- }
- protected:
- virtual ServiceState OnRunning( void );
- virtual ServiceState OnStarting( void );
- private:
- bool m_isBusy;
- CBaseTask * m_task;
- };
|