Ocean
Ocean::TemplatedLock< tActive > Class Template Reference

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

Inheritance diagram for Ocean::TemplatedLock< tActive >:

Additional Inherited Members

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

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: