00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_MUTEX_H_
00028 #define CEYLAN_MUTEX_H_
00029
00030
00031 #include "CeylanSystem.h"
00032 #include "CeylanLockable.h"
00033 #include "CeylanFeatures.h"
00034
00035 #include <string>
00036
00037
00038
00039
00040
00041 namespace Ceylan
00042 {
00043
00044
00045
00046 namespace System
00047 {
00048
00049
00050
00063 class CEYLAN_DLL Mutex : public Ceylan::Lockable
00064 {
00065
00066
00067
00078 struct SystemSpecificMutexType ;
00079
00080
00081 public:
00082
00083
00084
00092 Mutex() ;
00093
00094
00096 virtual ~Mutex() throw() ;
00097
00098
00099
00114 virtual void lock() ;
00115
00116
00117
00132 virtual void unlock() ;
00133
00134
00135
00147 virtual const std::string toString(
00148 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00149
00150
00151
00152 protected:
00153
00154
00155
00162 virtual void postLock() ;
00163
00164
00165
00172 virtual void preUnlock() ;
00173
00174
00175
00177 SystemSpecificMutexType & getMutexReference() ;
00178
00179
00180
00181 private:
00182
00183
00184
00196 Mutex( const Mutex & source ) ;
00197
00198
00199
00208 Mutex & operator = ( const Mutex & source ) ;
00209
00210
00212 SystemSpecificMutexType * _internalMutex ;
00213
00214
00215 } ;
00216
00217
00218 }
00219
00220 }
00221
00222
00223
00224 #endif // CEYLAN_MUTEX_H_
00225