![]() |
SUMO - Simulation of Urban MObility
|
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively. More...
#include <AbstractMutex.h>
Public Member Functions | |
ScopedLocker (AbstractMutex &lock) | |
Constructor. More... | |
~ScopedLocker () | |
Destructor Unlocks the mutex. More... | |
Private Member Functions | |
ScopedLocker & | operator= (const ScopedLocker &) |
Invalidated assignment operator. More... | |
ScopedLocker (const ScopedLocker &) | |
Invalidated copy constructor. More... | |
Private Attributes | |
AbstractMutex & | myLock |
The mutex to lock. More... | |
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
Definition at line 71 of file AbstractMutex.h.
|
inline |
Constructor.
[in] | lock | The mutex to lock |
Locks the mutex.
Definition at line 78 of file AbstractMutex.h.
References AbstractMutex::lock(), and myLock.
|
inline |
Destructor Unlocks the mutex.
Definition at line 86 of file AbstractMutex.h.
References myLock, and AbstractMutex::unlock().
|
private |
Invalidated copy constructor.
|
private |
Invalidated assignment operator.
|
private |
The mutex to lock.
Definition at line 92 of file AbstractMutex.h.
Referenced by ScopedLocker(), and ~ScopedLocker().