rpa::guard< Mutex > Class Template Reference

Used to be sure that mutex are properly unlocked after being locked. More...

#include <guard.h>

Inheritance diagram for rpa::guard< Mutex >:

rpa::obuf_guard< Mutex >::inner_guard List of all members.

Public Member Functions

 guard (Mutex *aMtx)
 ~guard ()

Private Member Functions

 guard ()
 guard (const guard &)
guardoperator= (const guard &)

Private Attributes

Mutex * _Mtx

Detailed Description

template<class Mutex>
class rpa::guard< Mutex >

Used to be sure that mutex are properly unlocked after being locked.

It is perfectly possible to specialise a specialization of 'guard_t', for such and such kind of mutex. TODO: An interesting semantic would be to encapsulate iterators into smart pointers, associated with a mutex, for thread safety. http://www.awprofessional.com/articles/article.asp?p=31529&seqNum=13&rl=1 "Smart pointers in C++" Alexei Alexandrescu.


Constructor & Destructor Documentation

template<class Mutex>
rpa::guard< Mutex >::guard (  )  [private]

template<class Mutex>
rpa::guard< Mutex >::guard ( const guard< Mutex > &   )  [private]

template<class Mutex>
rpa::guard< Mutex >::guard ( Mutex *  aMtx  )  [inline]

template<class Mutex>
rpa::guard< Mutex >::~guard (  )  [inline]


Member Function Documentation

template<class Mutex>
guard& rpa::guard< Mutex >::operator= ( const guard< Mutex > &   )  [private]


Member Data Documentation

template<class Mutex>
Mutex* rpa::guard< Mutex >::_Mtx [private]


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:38 2007 for rpa by  doxygen 1.4.7