#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; };