The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHA_TCP::Wakeup_Event Class Reference

A base class for asynchronous wakeup events. More...

Inheritance diagram for MHA_TCP::Wakeup_Event:
Inheritance graph

Public Member Functions

 Wakeup_Event ()
 Event Constructor. More...
 
virtual void observed_by (Event_Watcher *observer)
 Called by the Event_Watcher when this event is added to its list of observed events. More...
 
virtual void ignored_by (Event_Watcher *observer)
 Called by the Event_Watcher when this event is removed from its list of observed events. More...
 
virtual ~Wakeup_Event ()
 Destructor deregisters from observers. More...
 
virtual OS_EVENT_TYPE get_os_event ()
 Get necessary information for the Event Watcher. More...
 
virtual void reset ()
 For pure notification events, reset the "signalled" status. More...
 
virtual bool status ()
 Query wether the event is in signalled state now. More...
 

Protected Attributes

OS_EVENT_TYPE os_event
 
bool os_event_valid
 

Private Attributes

std::set< class Event_Watcher * > observers
 A list of all Event_Watcher instances that this Wakeup_Event is observed by (stored here for proper deregistering). More...
 

Detailed Description

A base class for asynchronous wakeup events.

Constructor & Destructor Documentation

◆ Wakeup_Event()

Wakeup_Event::Wakeup_Event ( )

Event Constructor.

The new event has invalid state.

◆ ~Wakeup_Event()

Wakeup_Event::~Wakeup_Event ( )
virtual

Destructor deregisters from observers.

Member Function Documentation

◆ observed_by()

void Wakeup_Event::observed_by ( Event_Watcher observer)
virtual

Called by the Event_Watcher when this event is added to its list of observed events.

◆ ignored_by()

void Wakeup_Event::ignored_by ( Event_Watcher observer)
virtual

Called by the Event_Watcher when this event is removed from its list of observed events.

◆ get_os_event()

OS_EVENT_TYPE Wakeup_Event::get_os_event ( )
virtual

Get necessary information for the Event Watcher.

Reimplemented in MHA_TCP::Timeout_Event.

◆ reset()

void Wakeup_Event::reset ( )
virtual

For pure notification events, reset the "signalled" status.

Reimplemented in MHA_TCP::Async_Notify.

◆ status()

bool Wakeup_Event::status ( )
virtual

Query wether the event is in signalled state now.

Member Data Documentation

◆ observers

std::set<class Event_Watcher *> MHA_TCP::Wakeup_Event::observers
private

A list of all Event_Watcher instances that this Wakeup_Event is observed by (stored here for proper deregistering).

◆ os_event

OS_EVENT_TYPE MHA_TCP::Wakeup_Event::os_event
protected

◆ os_event_valid

bool MHA_TCP::Wakeup_Event::os_event_valid
protected

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