-// 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;
};
}
}