Logo ROOT  
Reference Guide
TMCTemplateAutoLock< M, L, U > Class Template Reference

template<class M, typename L, typename U>
class TMCTemplateAutoLock< M, L, U >

Template classe which provides a mechanism to create a mutex and locks/unlocks it.

Extracted from G4AutoLock implementation for Linux Note: Note that G4TemplateAutoLock by itself is not thread-safe and cannot be shared among threads due to the locked switch

Definition at line 118 of file TMCAutoLock.h.

Public Member Functions

 TMCTemplateAutoLock (M *mtx, L l, U u)
 
virtual ~TMCTemplateAutoLock ()
 
void lock ()
 
void unlock ()
 

Private Member Functions

 TMCTemplateAutoLock (const TMCTemplateAutoLock &rhs)
 
TMCTemplateAutoLockoperator= (const TMCTemplateAutoLock &rhs)
 

Private Attributes

_l
 
M * _m
 
_u
 
bool locked
 

#include <TMCAutoLock.h>

Constructor & Destructor Documentation

◆ TMCTemplateAutoLock() [1/2]

template<class M , typename L , typename U >
TMCTemplateAutoLock< M, L, U >::TMCTemplateAutoLock ( M *  mtx,
l,
u 
)
inline

Definition at line 120 of file TMCAutoLock.h.

◆ ~TMCTemplateAutoLock()

template<class M , typename L , typename U >
virtual TMCTemplateAutoLock< M, L, U >::~TMCTemplateAutoLock ( )
inlinevirtual

Definition at line 122 of file TMCAutoLock.h.

◆ TMCTemplateAutoLock() [2/2]

template<class M , typename L , typename U >
TMCTemplateAutoLock< M, L, U >::TMCTemplateAutoLock ( const TMCTemplateAutoLock< M, L, U > &  rhs)
private

Member Function Documentation

◆ lock()

template<class M , typename L , typename U >
void TMCTemplateAutoLock< M, L, U >::lock ( )
inline

Definition at line 131 of file TMCAutoLock.h.

◆ operator=()

template<class M , typename L , typename U >
TMCTemplateAutoLock & TMCTemplateAutoLock< M, L, U >::operator= ( const TMCTemplateAutoLock< M, L, U > &  rhs)
private

◆ unlock()

template<class M , typename L , typename U >
void TMCTemplateAutoLock< M, L, U >::unlock ( )
inline

Definition at line 124 of file TMCAutoLock.h.

Member Data Documentation

◆ _l

template<class M , typename L , typename U >
L TMCTemplateAutoLock< M, L, U >::_l
private

Definition at line 147 of file TMCAutoLock.h.

◆ _m

template<class M , typename L , typename U >
M* TMCTemplateAutoLock< M, L, U >::_m
private

Definition at line 146 of file TMCAutoLock.h.

◆ _u

template<class M , typename L , typename U >
U TMCTemplateAutoLock< M, L, U >::_u
private

Definition at line 148 of file TMCAutoLock.h.

◆ locked

template<class M , typename L , typename U >
bool TMCTemplateAutoLock< M, L, U >::locked
private

Definition at line 145 of file TMCAutoLock.h.


The documentation for this class was generated from the following file: