BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
BALL::TWriteLocker< WriteLockerType, ReadWriteLockType > Class Template Reference

#include <BALL/SYSTEM/mutex.h>

Inheritance diagram for BALL::TWriteLocker< WriteLockerType, ReadWriteLockType >:
WriteLockerType

Public Member Functions

 TWriteLocker (ReadWriteLockType *lock)
 

Detailed Description

template<class WriteLockerType, class ReadWriteLockType>
class BALL::TWriteLocker< WriteLockerType, ReadWriteLockType >

This class provides a very thin wrapper around different mutex write-locker types. As default, BALL supports QWriteLocker, but it can be easily extended to support the same functionality with classes from boost or Intel Thread Building Blocks.

A BALL-mutex write-locker needs to provide a constructor which is called with a pointer to a corresponding TReadWriteLock. Upon construction, the mutex is automatically locked for write, and is automatically unlocked when the mutex runs out of scope.

Definition at line 152 of file mutex.h.

Constructor & Destructor Documentation

template<class WriteLockerType , class ReadWriteLockType >
BALL::TWriteLocker< WriteLockerType, ReadWriteLockType >::TWriteLocker ( ReadWriteLockType lock)
inline

Definition at line 156 of file mutex.h.