scoped_write_lock.h
Go to the documentation of this file.
00001 #ifndef MT_SCOPED_WRITE_LOCK_H
00002 #define MT_SCOPED_WRITE_LOCK_H
00003 
00004 #include "rw_lock.h"
00005 
00006 namespace mt
00007 {
00008 
00009 class scoped_write_lock
00010 {
00011         MT_PREVENT_COPY(scoped_write_lock)
00012 
00013         public:
00014 
00015                 typedef scoped_write_lock this_type;
00016                 typedef void             base_type;
00017 
00018                 scoped_write_lock(rw_lock & rwl) : rw(rwl)
00019                 {
00020                         this->rw.lock_write();
00021                 }
00022 
00023                 ~scoped_write_lock(void)
00024                 {
00025                         this->rw.unlock_write();
00026                 }
00027 
00028         protected:
00029 
00030                 rw_lock & rw;
00031 };
00032 
00033 }
00034 
00035 #endif // MT_SCOPED_WRITE_LOCK_H


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:35:11