|
reSIProcate/rutil
9694
|
A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destruction. More...
#include <Lock.hxx>


Public Member Functions | |
| Lock (Lockable &, LockType=VOCAL_LOCK) | |
| virtual | ~Lock () |
Private Attributes | |
| Lockable & | myLockable |
A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destruction.
(ie, a scoped lock)
| Lockable& | The object to lock |
| LockType | one of VOCAL_LOCK, VOCAL_READLOCK, VOCAL_WRITELOCK |
Definition at line 36 of file Lock.cxx.
References takeLock().
: myLockable(lockable) { takeLock(lockable, lockType); }

| Lock::~Lock | ( | ) | [virtual] |
Definition at line 42 of file Lock.cxx.
References myLockable, and resip::Lockable::unlock().
{
myLockable.unlock();
}

Lockable& resip::Lock::myLockable [private] |
1.7.5.1