Go to the documentation of this file.00001 #ifndef __MUTEX_ABSTRACTION_H__
00002 #define __MUTEX_ABSTRACTION_H__
00003
00004 #if !defined( WIN32_PLATFORM ) && !defined( NIX_PLATFORM ) && !defined( MINGW_PLATFORM ) && !defined( CYGWIN_PLATFORM )
00005 #define WIN32_PLATFORM
00006 #endif
00007
00008 #ifdef MUTEX_ABSTRACTION
00009 #if defined( WIN32_PLATFORM ) || defined( MINGW_PLATFORM ) || defined( CYGWIN_PLATFORM )
00010 #define MUTEX_ABSTRACTION_DLL_ENTITY __declspec( dllexport )
00011 #endif
00012
00013 #if defined( NIX_PLATFORM )
00014 #define MUTEX_ABSTRACTION_DLL_ENTITY
00015 #endif
00016 #else
00017 #ifdef WIN32_PLATFORM
00018 #define MUTEX_ABSTRACTION_DLL_ENTITY __declspec( dllimport )
00019 #pragma comment( lib , "mutex_abstraction.lib" )
00020 #endif
00021
00022 #if defined( CYGWIN_PLATFORM ) || defined( MINGW_PLATFORM )
00023 #define MUTEX_ABSTRACTION_DLL_ENTITY __declspec( dllimport )
00024 #endif
00025
00026 #if defined( NIX_PLATFORM )
00027 #define MUTEX_ABSTRACTION_DLL_ENTITY
00028 #endif
00029 #endif
00030
00031 namespace nitro
00032 {
00045 class MUTEX_ABSTRACTION_DLL_ENTITY MutexAbstraction{
00046 public:
00047
00062 MutexAbstraction( void );
00063
00078 void Release( void );
00079
00094 void CreateMutex( void );
00095
00110 void Lock( void );
00111
00126 void UnLock( void );
00127
00138 virtual ~MutexAbstraction();
00139
00140 private:
00141
00152 void * Mutex;
00153
00168 MutexAbstraction( const MutexAbstraction & m );
00169
00184 MutexAbstraction operator=( const MutexAbstraction & m );
00185 };
00186 }
00187
00188 #endif