Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Lock.h

00001 /*
00002   File: Lock.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef LOCK_H
00007 #define LOCK_H
00008 
00009 #include<Mutex.h>
00010 
00013 class Lock
00014 {
00015 public:
00021     Lock(Mutex &m) : mutex(m) {
00022         mutex.lock();
00023     }
00024 
00030     ~Lock() {
00031         mutex.unlock();
00032     }
00033 
00034 private:
00036     Mutex &mutex;
00037 };
00038 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.