Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Guard Class Reference

#include <guard.h>

List of all members.

Public Methods

 Guard (CRITICAL_SECTION &l)
 ~Guard ()

Private Attributes

CRITICAL_SECTION & Lock
 Reference to Critical Section we are guarding.


Detailed Description

The Guard class implements a synchronization mechanism based on the aquistion and release of a CRITICAL_SECTION upon construction and destruction of a Guard object.

Note:
Objects that wish to use this must have a Critical Section, must initialze it in their constructor (InitializeCriticalSection), and must destroy it in their destructor (DeleteCriticalSection).
Remarks:
BSD and Unix would use mutexes here.

Definition at line 24 of file guard.h.


Constructor & Destructor Documentation

Guard::Guard (  CRITICAL_SECTION &    l )  [inline]
 

Constructor for Guard class.

Parameters:
l  A reference to the Object's Critical Section

Definition at line 32 of file guard.h.

References Lock.

Guard::~Guard (    )  [inline]
 

Destructor for Guard class.

Definition at line 38 of file guard.h.

References Lock.


Member Data Documentation

CRITICAL_SECTION& Guard::Lock [private]
 

Reference to Critical Section we are guarding.

Definition at line 25 of file guard.h.

Referenced by Guard(), and ~Guard().


The documentation for this class was generated from the following file:
Generated on Mon Mar 29 23:12:57 2004 for Paradigm by doxygen1.2.17