Go to the documentation of this file.00001 #ifndef __THREAD_H__
00002 #define __THREAD_H__
00003
00004 #if !defined( WIN32_PLATFORM ) && !defined( NIX_PLATFORM ) && !defined( MINGW_PLATFORM ) && !defined( CYGWIN_PLATFORM )
00005 #define WIN32_PLATFORM
00006 #endif
00007
00008 #include <system/thread_abstraction.h>
00009 #include <utilities/exception.h>
00010
00011 #if defined( NIX_PLATFORM )
00012 #define THREAD_DLL_ENTITY
00013 #endif
00014
00015 #ifdef THREAD
00016 #if defined( WIN32_PLATFORM ) || defined( MINGW_PLATFORM ) || defined( CYGWIN_PLATFORM )
00017 #define THREAD_DLL_ENTITY __declspec( dllexport )
00018 #endif
00019 #else
00020 #if defined( WIN32_PLATFORM )
00021 #define THREAD_DLL_ENTITY __declspec( dllimport )
00022 #pragma comment( lib , "thread.lib" )
00023 #endif
00024
00025 #if defined( CYGWIN_PLATFORM ) || defined( MINGW_PLATFORM )
00026 #define THREAD_DLL_ENTITY __declspec( dllimport )
00027 #endif
00028 #endif
00029
00030 namespace nitro
00031 {
00044 class THREAD_DLL_ENTITY Thread{
00045
00046 public:
00047
00062 Thread( void );
00063
00078 void Run( void );
00079
00094 virtual void ThreadFunction( void ) = 0;
00095
00106 virtual ~Thread();
00107
00108 private:
00109
00120 ThreadAbstraction LocalThread;
00121
00136 void operator=( const Thread & Thread ){}
00137
00152 Thread( const Thread & Thread ){}
00153 };
00154 }
00155
00156 #endif