Ocean
Loading...
Searching...
No Matches
Ocean::TemplatedLock< tActive > Class Template Reference

This class implements a template-based recursive lock object. More...

#include <Lock.h>

Inheritance diagram for Ocean::TemplatedLock< tActive >:

Additional Inherited Members

- Public Member Functions inherited from Ocean::Lock
 Lock ()
 Creates a new lock object.
 
 ~Lock ()
 Destructs a lock object.
 
void lock ()
 Locks the critical section.
 
void unlock ()
 Unlocks the critical section.
 
bool isLocked ()
 Returns whether this critical section is locked by another thread.
 
- Protected Member Functions inherited from Ocean::Lock
 Lock (const Lock &lock)=delete
 Disabled copy constructor.
 
Lockoperator= (const Lock &lock)=delete
 Disabled assign operator.
 
- Protected Attributes inherited from Ocean::Lock
CRITICAL_SECTION criticalSection_
 Critical section object of windows.
 
pthread_mutex_t mutex_
 Pthread mutex object.
 

Detailed Description

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

This class implements a template-based recursive lock object.

The class allows to e.g., implement classes which can be thread-safe or not based on a template parameter.

Template Parameters
tActiveTrue, to activate the lock; False, to avoid using the lock at all

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