gslmm::guard< Lock > Struct Template Reference
[Miscellaneous]

#include <gslmm-util.hh>

Collaboration diagram for gslmm::guard< Lock >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename Lock>
struct gslmm::guard< Lock >

Class to ease the locking.

The argument to the constructor must be some kind of lock. When the object is created (constructed) the lock is aquired, and when the object goes out of scope (destructed), the lock is released.

Parameters:
Lock The type of lock to lock.


Public Member Functions

 guard (Lock &lock)
 ~guard ()

Public Attributes

Lock & _lock


Constructor & Destructor Documentation

template<typename Lock>
gslmm::guard< Lock >::guard Lock &  lock  )  [inline]
 

CTOR.

Acquires the lock

Parameters:
lock The lock to acquire.

template<typename Lock>
gslmm::guard< Lock >::~guard  )  [inline]
 

DTOR.

Releases the lock.


Member Data Documentation

template<typename Lock>
Lock& gslmm::guard< Lock >::_lock
 

The lock.


The documentation for this struct was generated from the following file:
Top of page Last update Tue May 9 10:11:31 2006
Christian Holm
Created by DoxyGen 1.4.6