+
+class CThread
+{
+public:
+ CThread(void);
+ virtual ~CThread(void);
+
+ virtual bool IsRunning(void) const { return m_bRunning; }
+ virtual bool CreateThread(void);
+ virtual bool StopThread(bool bWaitForExit = true);
+
+ static void *ThreadHandler(CThread *thread);
+ virtual void *Process(void) = 0;
+
+protected:
+ pthread_t m_thread;
+ bool m_bRunning;
+ bool m_bStop;
+};