Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

LockScope< num_doors > Class Template Reference

#include <LockScope.h>

List of all members.


Detailed Description

template<unsigned int num_doors>
class LockScope< num_doors >

Locks a MutexLock until the LockScope goes out of scope.

This can help prevent forgetting to do it if you function has multiple return points

Definition at line 11 of file LockScope.h.

Public Member Functions

 LockScope (MutexLock< num_doors > &lock)
 constructor, locks lock with the current process's id (ProcessID::getID())
 LockScope (MutexLock< num_doors > &lock, int id)
 constructor, locks lock with id
 ~LockScope ()
 destructor, releases lock received in constructor

Protected Attributes

MutexLock< num_doors > & l
 the lock


Constructor & Destructor Documentation

template<unsigned int num_doors>
LockScope< num_doors >::LockScope MutexLock< num_doors > &  lock  )  [inline]
 

constructor, locks lock with the current process's id (ProcessID::getID())

Definition at line 14 of file LockScope.h.

template<unsigned int num_doors>
LockScope< num_doors >::LockScope MutexLock< num_doors > &  lock,
int  id
[inline]
 

constructor, locks lock with id

Definition at line 16 of file LockScope.h.

template<unsigned int num_doors>
LockScope< num_doors >::~LockScope  )  [inline]
 

destructor, releases lock received in constructor

Definition at line 18 of file LockScope.h.


Member Data Documentation

template<unsigned int num_doors>
MutexLock<num_doors>& LockScope< num_doors >::l [protected]
 

the lock

Definition at line 20 of file LockScope.h.

Referenced by LockScope< num_doors >::LockScope(), and LockScope< num_doors >::~LockScope().


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

Tekkotsu v2.4.1
Generated Tue Aug 16 16:35:04 2005 by Doxygen 1.4.4