/*
 * QrfeMutexLocker.h
 *
 *  Created on: 15.02.2011
 *      Author: stefan.detter
 */

#ifndef QRFEMUTEXLOCKER_H_
#define QRFEMUTEXLOCKER_H_

#include <QMutex>
#include <QrfeTraceModule>

class QrfeMutexLocker : public QrfeTraceModule
{
public:
	QrfeMutexLocker(QMutex* mutex);
	QrfeMutexLocker(QMutex* mutex, QString name);
	~QrfeMutexLocker();

	QMutex*	mutex () const;
	void	relock ();
	void	unlock ();

private:
	QMutex*		m_mutex;
	QString 	m_name;

public:
	static uint _traceLevel;
};

#endif /* QRFEMUTEXLOCKER_H_ */
