Salome HOME
updated copyright message
[modules/yacs.git] / src / bases / AutoLocker.hxx
index fe7862ad284f5fb4d81339040642efed04377b5e..7f1aa20b916354c3f603d8618a0164e26cddc1a8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #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;
     };
   }
 }