00001 #ifndef THREAD_H_DEFINED
00002 #define THREAD_H_DEFINED
00003
00004
00005
00006 #include <pthread.h>
00007 #include <string>
00008
00009 class Thread
00010 {
00011 public:
00012 Thread(std::string _name);
00013 virtual int start();
00014 virtual void stop();
00015 virtual void run() = 0;
00016
00017 private:
00018 static void* runThread(void* _thread);
00019
00020 public:
00021 const std::string name;
00022
00023 private:
00024 pthread_t thread;
00025
00026 protected:
00027 bool running;
00028
00029 };
00030 #endif