Nebula
Loading...
Searching...
No Matches
Posix::PosixEvent Class Reference

#include <posixevent.h>

Detailed Description

Posix implmentation of an event synchronization object.

(C) 2006 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Public Member Functions

 PosixEvent (bool manualReset=false)
 constructor
 
 PosixEvent (PosixEvent &&ev)
 Move constructor.
 
 ~PosixEvent ()
 destructor
 
void Signal ()
 signal the event
 
void Reset ()
 reset the event (only if manual reset)
 
void Wait () const
 wait for the event to become signalled
 
bool WaitTimeout (int ms) const
 wait for the event with timeout in millisecs
 
bool Peek () const
 check if event is signalled
 
bool IsManual () const
 Returns true if event is manually reset.
 

Private Attributes

bool manual
 
sem_t * semaphore
 

Constructor & Destructor Documentation

◆ PosixEvent() [1/2]

Posix::PosixEvent::PosixEvent ( bool manualReset = false)
inline

constructor

manual reset is not used, since it's only used for win32events

◆ PosixEvent() [2/2]

Posix::PosixEvent::PosixEvent ( PosixEvent && ev)
inline

Move constructor.

◆ ~PosixEvent()

Posix::PosixEvent::~PosixEvent ( )
inline

destructor

Member Function Documentation

◆ IsManual()

bool Posix::PosixEvent::IsManual ( ) const
inline

Returns true if event is manually reset.

◆ Peek()

bool Posix::PosixEvent::Peek ( ) const
inline

check if event is signalled

This checks if the event is signalled and returnes immediately.

◆ Reset()

void Posix::PosixEvent::Reset ( )
inline

reset the event (only if manual reset)

◆ Signal()

void Posix::PosixEvent::Signal ( )
inline

signal the event

◆ Wait()

void Posix::PosixEvent::Wait ( ) const
inline

wait for the event to become signalled

◆ WaitTimeout()

bool Posix::PosixEvent::WaitTimeout ( int timeoutInMilliSec) const
inline

wait for the event with timeout in millisecs

Waits for the event to become signaled with a specified timeout in milli seconds.

If the method times out it will return false, if the event becomes signalled within the timeout it will return true.

Member Data Documentation

◆ manual

bool Posix::PosixEvent::manual
private

◆ semaphore

sem_t* Posix::PosixEvent::semaphore
private

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