openikev2::AutoLock Class Reference

This class automatically acquires a Mutex and release it when it goes out of scope (if not released before). More...

#include <autolock.h>

List of all members.

Public Member Functions

 AutoLock (Mutex &managed_mutex)
 Creates a new AutoLock to manage the indicated Mutex.
void release ()
 Releases the managed Mutex before the AutoLock destruction.

Private Attributes

Mutexmutex
 Mutex to be managed.
bool must_release
 Indicates if the mutex must be relased when the AutoLock goes out of scope.


Detailed Description

This class automatically acquires a Mutex and release it when it goes out of scope (if not released before).

Author:
Alejandro Perez Mendez, Pedro J. Fernandez Ruiz <alejandro_perez@dif.um.es, pedroj.fernandez@dif.um.es>


Constructor & Destructor Documentation

openikev2::AutoLock::AutoLock ( Mutex managed_mutex  ) 

Creates a new AutoLock to manage the indicated Mutex.

Parameters:
managed_mutex Mutex to be managed


Generated on Fri Jul 27 11:04:49 2007 for libopenikev2 by  doxygen 1.5.1