reSIProcate/rutil  9694
Public Member Functions | Private Attributes
resip::Lock Class Reference

A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destruction. More...

#include <Lock.hxx>

Inheritance diagram for resip::Lock:
Inheritance graph
[legend]
Collaboration diagram for resip::Lock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Lock (Lockable &, LockType=VOCAL_LOCK)
virtual ~Lock ()

Private Attributes

LockablemyLockable

Detailed Description

A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destruction.

(ie, a scoped lock)

See also:
Mutex

Definition at line 22 of file Lock.hxx.


Constructor & Destructor Documentation

Lock::Lock ( Lockable lockable,
LockType  lockType = VOCAL_LOCK 
)
Parameters:
Lockable&The object to lock
LockTypeone of VOCAL_LOCK, VOCAL_READLOCK, VOCAL_WRITELOCK

Definition at line 36 of file Lock.cxx.

References takeLock().

   : myLockable(lockable)
{
   takeLock(lockable, lockType);
}

Here is the call graph for this function:

Lock::~Lock ( ) [virtual]

Definition at line 42 of file Lock.cxx.

References myLockable, and resip::Lockable::unlock().

Here is the call graph for this function:


Member Data Documentation

Definition at line 33 of file Lock.hxx.

Referenced by ~Lock().


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