# BasicCondition Class Reference

There are two basic methods of using this class. More...

`#include <BasicCondition.h>`

Inheritance diagram for BasicCondition:

[legend]
Collaboration diagram for BasicCondition:

[legend]
List of all members.

## Public Member Functions

| BasicCondition ()
| ~BasicCondition ()
void | wait ()
| Wait for a signal indefinately.
bool | timedWait (int msec)
| Wait for a signal no longer than msec milliseconds.
void | signal ()
| Signal one waiting process.
void | broadcast ()
| Signal all waiting processes.

## Private Attributes

pthread_cond_t | cond

## Detailed Description

There are two basic methods of using this class.

1. A class can inherit from BasicCondition. This alows code to lock on the inherited object itself.
2. The user can create instances of BasicCondition directly.

## Constructor & Destructor Documentation

BasicCondition::BasicCondition | ( |  | ) |

BasicCondition::~BasicCondition | ( |  | ) |

## Member Function Documentation

void BasicCondition::broadcast | ( |  | ) | `[inline]`

| Signal all waiting processes.

void BasicCondition::signal | ( |  | ) | `[inline]`

| Signal one waiting process.

bool BasicCondition::timedWait | ( | int | msec | ) |

Wait for a signal no longer than msec milliseconds.

This usefull if you cannot always guarantee a signal will come.

Parameters:

  | msec | Timeout in milliseconds

Returns:
  true if signaled, false if timedout or an error occured.

void BasicCondition::wait | ( |  | ) | `[inline]`

| Wait for a signal indefinately.

## Member Data Documentation

pthread_cond_t BasicCondition::cond `[private]`

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

- BasicCondition.h
- BasicCondition.cpp