Lock.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef LOCK_H_
00004 #define LOCK_H_
00005 
00006 #include <fesa-core/Utilities/AbstractMutex.h>
00007 
00008 namespace fesa
00009 {
00010 
00018 class Lock
00019 {
00020   public:
00021 
00025     Lock(AbstractMutex& m): m_(&m) {m_->lock();}
00026 
00030     ~Lock() {m_->unlock();}
00031 
00032   private:
00033     AbstractMutex* m_;
00034 
00035     // Hide
00036     Lock(const Lock&);
00037     void operator=(const AbstractMutex&);
00038 };
00039 
00040 /**********************************************************************/
00041 
00042 } // fesa
00043 
00044 #endif // LOCK_H_

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1