Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Thread.unix.h

00001 /*
00002   File: Thread.unix.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef THREAD_H
00007 #define THREAD_H
00008 
00009 #include<Mutex.h>
00010 
00011 #include<pthread.h>
00012 
00018 class Thread
00019 {
00021     friend void *threadFunc(void *obj);
00022 
00023 public:
00025     Thread();
00026     virtual ~Thread();
00027 
00029     bool isActive();
00030 
00032     virtual void *run() = 0;
00033 
00035     void *start();
00036 
00038     void join();
00039 
00040 private:
00042     pthread_t threadId;
00043 
00045     bool active;
00046 
00048     Mutex mutex;
00049 };
00050 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.