Go to the documentation of this file.00001 #ifndef QRK_LOCK_H
00002 #define QRK_LOCK_H
00003
00013 #include "ConditionVariable.h"
00014
00015
00016 namespace qrk
00017 {
00019 class Lock
00020 {
00021 public:
00022 Lock(void);
00023 ~Lock(void);
00024
00025
00027 void lock(void);
00028
00029
00031 bool tryLock(void);
00032
00033
00035 void unlock(void);
00036
00037 private:
00038 friend class ConditionalVariable;
00039 friend bool ConditionVariable::wait(Lock* lock, int timeout);
00040
00041 Lock(const Lock& rhs);
00042 Lock& operator = (const Lock& rhs);
00043
00044
00045
00046
00047 struct pImpl;
00048 const std::auto_ptr<pImpl> pimpl;
00049 };
00050 }
00051
00052 #endif