Salome HOME
First test qui HPsalome container is running.
[modules/yacs.git] / src / bases / AutoLocker.hxx
index fe7862ad284f5fb4d81339040642efed04377b5e..8960361ea33cb1bdf01a02fed01d4d09622c8823 100644 (file)
 #define __AUTOLOCKER_HXX__
 
 #include "Exception.hxx"
-#include "Mutex.hxx"
 
 namespace YACS
 {
   namespace BASES
   {
+    template<class T>
     class AutoLocker
     {
     public:
-      AutoLocker(Mutex *m):_ptr(m) { _ptr->lock(); }
-      ~AutoLocker() { _ptr->unlock(); }
+      AutoLocker(T *m):_ptr(m) { _ptr->lock(); }
+      ~AutoLocker() { _ptr->unLock(); }
     private:
-      Mutex *_ptr;
+      T *_ptr;
     };
   }
 }