Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

Thread.h

00001 /* START_LICENSE_HEADER
00002 
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005 
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009 
00010 END_LICENSE_HEADER */
00011 #ifndef __THREAD_H__
00012 #define __THREAD_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014 
00015 #if defined(linux) || defined(unix)
00016 #include <pthread.h>
00017 #endif
00018 
00019 namespace RNReplicaNet
00020 {
00021 
00022 class ThreadClass;
00023 
00028 class REPNETEXPORTAPI Thread
00029 {
00030 public:
00034     Thread();
00035 
00039     virtual ~Thread();
00040 
00046     void Begin(ThreadClass *threaded_class);
00047 
00051     void Terminate(void);
00052 
00057     static int CallThreadEntry(ThreadClass *thread_class);
00058 
00063     bool GetIsRunning(void) const;
00064 
00065 
00066 private:
00067     ThreadClass *mThreadClass;
00068 #if defined(_WIN32)
00069     void *mThreadHandle;
00070 //  unsigned long mThreadHandle;
00071 #endif
00072 #if defined(linux) || defined(unix)
00073     pthread_t mThreadHandle;
00074 #endif
00075 #if defined (_PS2)
00076     int mThreadHandle;
00077 #endif
00078 
00079     volatile bool mIsRunning;
00080 };
00081 
00082 } // namespace RNReplicaNet
00083 
00084 #endif

Generated on Sun Oct 30 01:12:31 2005 for Platform by  doxygen 1.4.1