Ocean
Ocean::TemplatedScopedLock< tActive > Class Template Reference

This class implements a recursive scoped lock object that is activated by a boolean template parameter. More...

Public Member Functions

 TemplatedScopedLock (Lock &lock)
 Creates a new scoped lock object by a given lock object. More...
 
 TemplatedScopedLock (TemplatedLock< tActive > &lock)
 Creates a new scoped lock object by a given lock object. More...
 
 ~TemplatedScopedLock ()
 Destructs a scoped lock and unlocks the internal lock object. More...
 

Protected Member Functions

 TemplatedScopedLock (const TemplatedScopedLock< tActive > &object)=delete
 Disabled accessible copy operator. More...
 
TemplatedScopedLockoperator= (const TemplatedScopedLock< tActive > &object)=delete
 Disabled accessible assigns operator. More...
 

Protected Attributes

Locklock_
 Lock object which is locked during the existence of this scoped lock object. More...
 

Detailed Description

template<bool tActive>
class Ocean::TemplatedScopedLock< tActive >

This class implements a recursive scoped lock object that is activated by a boolean template parameter.

Template Parameters
tActiveTrue, to active the scoped lock, false to deactivate the scoped lock
See also
Lock, ScopedLock, TemporaryScopedLock, OptionalScopedLock.

Constructor & Destructor Documentation

◆ TemplatedScopedLock() [1/3]

template<bool tActive>
Ocean::TemplatedScopedLock< tActive >::TemplatedScopedLock ( Lock lock)
inlineexplicit

Creates a new scoped lock object by a given lock object.

Parameters
lockThe lock object used for locking

◆ TemplatedScopedLock() [2/3]

template<bool tActive>
Ocean::TemplatedScopedLock< tActive >::TemplatedScopedLock ( TemplatedLock< tActive > &  lock)
inlineexplicit

Creates a new scoped lock object by a given lock object.

Parameters
lockThe lock object used for locking

◆ ~TemplatedScopedLock()

template<bool tActive>
Ocean::TemplatedScopedLock< tActive >::~TemplatedScopedLock
inline

Destructs a scoped lock and unlocks the internal lock object.

◆ TemplatedScopedLock() [3/3]

template<bool tActive>
Ocean::TemplatedScopedLock< tActive >::TemplatedScopedLock ( const TemplatedScopedLock< tActive > &  object)
protecteddelete

Disabled accessible copy operator.

Parameters
objectThe object to copy

Member Function Documentation

◆ operator=()

template<bool tActive>
TemplatedScopedLock& Ocean::TemplatedScopedLock< tActive >::operator= ( const TemplatedScopedLock< tActive > &  object)
protecteddelete

Disabled accessible assigns operator.

Parameters
objectThe right object
Returns
Reference to this object

Field Documentation

◆ lock_

template<bool tActive>
Lock& Ocean::TemplatedScopedLock< tActive >::lock_
protected

Lock object which is locked during the existence of this scoped lock object.


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