IBR-DTNSuite  0.8
ibrcommon/ibrcommon/thread/MutexLock.h
Go to the documentation of this file.
00001 #ifndef IBRCOMMON_MUTEXLOCK_H_
00002 #define IBRCOMMON_MUTEXLOCK_H_
00003 
00004 #include "ibrcommon/thread/Mutex.h"
00005 
00006 namespace ibrcommon
00007 {
00008         class MutexLock
00009         {
00010                 public:
00011                         MutexLock(MutexInterface &m);
00012                         virtual ~MutexLock();
00013 
00014                 private:
00015                         MutexInterface &m_mutex;
00016         };
00017 
00018         class MutexTryLock
00019         {
00020                 public:
00021                         MutexTryLock(MutexInterface &m);
00022                         virtual ~MutexTryLock();
00023 
00024                 private:
00025                         MutexInterface &m_mutex;
00026         };
00027 
00028         class IndicatingLock : public MutexLock
00029         {
00030                 public:
00031                         IndicatingLock(MutexInterface &m, bool &indicator);
00032                         virtual ~IndicatingLock();
00033 
00034                 private:
00035                         bool &_indicator;
00036         };
00037 }
00038 
00039 #endif /*IBRCOMMON_MUTEXLOCK_H_*/