This class implements a signal.
More...
#include <Signal.h>
|
| | Signal () |
| | Creates a new signal object.
|
| |
| | ~Signal () |
| | Destructs a signal object.
|
| |
| void | wait () const |
| | Returns after the signal has been pulsed.
|
| |
| bool | wait (const unsigned int time) const |
| | Returns after the signal has been pulsed or the specified time elapsed.
|
| |
| bool | pulse () |
| | Pulses this signal.
|
| |
| bool | reset () |
| | Resets the signal.
|
| |
| void | release () |
| | Pulses the signal for the last time to allow a waiting process to proceed and releases the signal.
|
| |
| void * | handle () const |
| | Returns the signal handle.
|
| |
This class implements a signal.
◆ Signal() [1/2]
| Ocean::Signal::Signal |
( |
| ) |
|
Creates a new signal object.
◆ ~Signal()
| Ocean::Signal::~Signal |
( |
| ) |
|
Destructs a signal object.
◆ Signal() [2/2]
| Ocean::Signal::Signal |
( |
const Signal & |
otherSignal | ) |
|
|
protecteddelete |
Disabled copy constructor.
- Parameters
-
| otherSignal | Object which would be copied |
◆ handle()
| void * Ocean::Signal::handle |
( |
| ) |
const |
|
inline |
Returns the signal handle.
- Returns
- Signal handle
◆ operator=()
| Signal & Ocean::Signal::operator= |
( |
const Signal & |
otherSignal | ) |
|
|
protecteddelete |
Disabled assign operator.
- Parameters
-
| otherSignal | Object which would be copied |
- Returns
- Reference to this object
◆ pulse()
| bool Ocean::Signal::pulse |
( |
| ) |
|
Pulses this signal.
- Returns
- True, if succeeded
◆ release()
| void Ocean::Signal::release |
( |
| ) |
|
Pulses the signal for the last time to allow a waiting process to proceed and releases the signal.
◆ reset()
| bool Ocean::Signal::reset |
( |
| ) |
|
Resets the signal.
- Returns
- True, if succeeded
◆ wait() [1/2]
| void Ocean::Signal::wait |
( |
| ) |
const |
Returns after the signal has been pulsed.
◆ wait() [2/2]
| bool Ocean::Signal::wait |
( |
const unsigned int |
time | ) |
const |
Returns after the signal has been pulsed or the specified time elapsed.
- Parameters
-
| time | Maximal wait time in ms |
- Returns
- True, if the signal has been pulsed, False otherwise
◆ Signals
◆ semaphoreObject [1/2]
| dispatch_semaphore_t Ocean::Signal::semaphoreObject |
|
protected |
Semaphore object for Apple platforms.
◆ semaphoreObject [2/2]
| sem_t Ocean::Signal::semaphoreObject |
|
mutableprotected |
Semaphore object for e.g., Android platforms.
◆ semaphoreObjectReleased
| std::atomic< bool > Ocean::Signal::semaphoreObjectReleased |
|
protected |
True, if the semaphore object has been released and should not be used anymore.
True, if the semaphore object (for e.g., Android platforms) has been released and should not be used anymore.
◆ semaphoreObjectState
| bool Ocean::Signal::semaphoreObjectState |
|
protected |
True, if the semaphore object (for e.g., Android platforms) is valid and has been initialized.
◆ signalHandle
| void* Ocean::Signal::signalHandle |
|
protected |
Signal handle for Windows platforms.
The documentation for this class was generated from the following file: