Public Member Functions

CdcSemaphore Class Reference

A Wrapper for an OS semaphore. More...

#include <DcSemaphore.h>

List of all members.

Public Member Functions

 CdcSemaphore (int init_count=0, int max_count=100)
 Constructor - Creates the semaphore.
virtual ~CdcSemaphore ()
 Destructor - Releases the semaphore.
bool Wait (int wait=INFINITE)
 Waits (takes) on a semaphore.
bool Call (int count=1)
 Release one or more 'waits' one the semaphore.

Detailed Description

A Wrapper for an OS semaphore.

Author:
Erez Bibi
Version:
1.0

Definition at line 36 of file DcSemaphore.h.


Constructor & Destructor Documentation

CdcSemaphore::CdcSemaphore ( int  init_count = 0,
int  max_count = 100 
) [inline]

Constructor - Creates the semaphore.

Parameters:
init_countHow many are taken at creation time.
max_countMaximum 'places' in the semaphore.

Definition at line 51 of file DcSemaphore.h.

virtual CdcSemaphore::~CdcSemaphore (  ) [inline, virtual]

Destructor - Releases the semaphore.

Definition at line 60 of file DcSemaphore.h.


Member Function Documentation

bool CdcSemaphore::Call ( int  count = 1 ) [inline]

Release one or more 'waits' one the semaphore.

Parameters:
countHow many 'waits' to release.
Returns:
False when semaphore is empty.

Definition at line 78 of file DcSemaphore.h.

bool CdcSemaphore::Wait ( int  wait = INFINITE ) [inline]

Waits (takes) on a semaphore.

Parameters:
waitThe max time to wait for the semaphore [mSec].
Returns:
(bool) False if timeout.

Definition at line 69 of file DcSemaphore.h.


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