JetByteTools::Win32::CWaitableCounter Class Reference
[Win32 Synchronization primitives]

Collaboration diagram for JetByteTools::Win32::CWaitableCounter:

Collaboration graph
[legend]
List of all members.

Detailed Description

A counter that can be incremented and decremented and where you can wait on it either becoming zero or becoming non-zero.


Public Member Functions

 CWaitableCounter (long initialCount=0)
 Create a waitable counter with the supplied initial count.
void SetValue (const long value)
void Increment ()
void Decrement ()
long GetValue () const
const IWaitableGetAtZeroWaitObject () const
 Obtain an interface to an object to wait on for the count to become zero.
const IWaitableGetNotAtZeroWaitObject () const
 Obtain an interface to an object to wait on for the count to become non zero.

Classes

class  Decrementer
 A class that provides support for scope based decrementing of a waitable counter. The count is decreased for the life of the Decrementer; that is, it is decremented in the constructor of the and incremented in the destrutor. More...
class  Incrementer
 A class that provides support for scope based incrementing of a waitable counter. The count is incremented for the life of the Incrementer; that is, it is incremented in the constructor of the and decremented in the destrutor. More...


Constructor & Destructor Documentation

JetByteTools::Win32::CWaitableCounter::CWaitableCounter ( long  initialCount = 0  )  [explicit]

Create a waitable counter with the supplied initial count.


Member Function Documentation

void JetByteTools::Win32::CWaitableCounter::SetValue ( const long  value  ) 

void JetByteTools::Win32::CWaitableCounter::Increment (  ) 

void JetByteTools::Win32::CWaitableCounter::Decrement (  ) 

long JetByteTools::Win32::CWaitableCounter::GetValue (  )  const

const IWaitable & JetByteTools::Win32::CWaitableCounter::GetAtZeroWaitObject (  )  const

Obtain an interface to an object to wait on for the count to become zero.

const IWaitable & JetByteTools::Win32::CWaitableCounter::GetNotAtZeroWaitObject (  )  const

Obtain an interface to an object to wait on for the count to become non zero.


Generated on Tue May 8 17:48:18 2007 for JetByte Socket Tools by  doxygen 1.5.2