Main Page Namespace List Class Hierarchy Compound List File List Compound Members File Members
cbits::SignalObject Class Reference
Used by an event producer to notify event consumers of the occurrence of a significant event.
More...
#include <SignalObject.h>
Inheritance diagram for cbits::SignalObject:
[legend]List of all members.
Detailed Description
Used by an event producer to notify event consumers of the occurrence of a significant event.
The event producer(s) and the event consumers must all have a reference to the same SignalObject instance.
The event consumers 'wait' for the event (see SignalObject::wait) while the event producer sends notice when the event occurs (see SignalObject::notify and SignalObject::notifyAll).
Implementation Note:
A SignalObject derived class must be implemented for each new platform. The protected, pure virtual impl_XXX methods (see below) must be implemented in the derived class.
Constructor & Destructor Documentation
SignalObject::~SignalObject |
( |
|
) |
[virtual] |
|
SignalObject::SignalObject |
( |
|
) |
[protected] |
|
cbits::SignalObject::SignalObject |
( |
const SignalObject & |
|
) |
[private] |
|
Member Function Documentation
SignalObject * SignalObject::create |
( |
|
) |
[static] |
|
virtual const bool cbits::SignalObject::impl_notify |
( |
|
) |
[protected, pure virtual] |
|
virtual const bool cbits::SignalObject::impl_notify_all |
( |
|
) |
[protected, pure virtual] |
|
virtual const bool cbits::SignalObject::impl_wait |
( |
const long |
msec = 0 |
) |
[protected, pure virtual] |
|
const bool SignalObject::notify |
( |
|
) |
|
|
|
Send signal to a object waiting for a signal.
-
Returns:
-
true if signal was sent; false otherwise.
|
const bool SignalObject::notifyAll |
( |
|
) |
|
|
|
Send signal to all objects waiting for a signal.
-
Returns:
-
true if signal was sent; false otherwise.
|
SignalObject& cbits::SignalObject::operator= |
( |
const SignalObject & |
|
) |
[private] |
|
const bool SignalObject::wait |
( |
const long |
msec = 0 |
) |
|
|
|
Wait for a signal.
-
Returns:
-
true if signal was received; false, otherwise.
-
Parameters:
-
msec |
Maximum number of milliseconds to wait. A value of msec less than or equal to zero is interpreted as 'wait forever'. |
|
The documentation for this class was generated from the following files:
Generated by |
|
|
Hosted by |
|
|