ADTF
Loading...
Searching...
No Matches
adtf::ucom::ant::IEventSink Class Referenceabstract

#include <event_source_intf.h>

Public Member Functions

 ADTF_IID (IEventSink, "event_sink.ant.ucom.adtf.iid")
 
virtual tResult HandleEvent (const IEventSource &oSource, const void *pvEventData)=0
 

Protected Member Functions

 ~IEventSink ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

The class IEventSink provides a generic event listener interface for Internal Events.

Member Function Documentation

◆ ADTF_IID()

adtf::ucom::ant::IEventSink::ADTF_IID ( IEventSink ,
"event_sink.ant.ucom.adtf.iid"  )

Marks the IEventSink to be castable with the ucom_cast<>

See also
ADTF_IID(_interface, _striid)

◆ HandleEvent()

virtual tResult adtf::ucom::ant::IEventSink::HandleEvent ( const IEventSource & oSource,
const void * pvEventData )
pure virtual

Handle event. The HandleEvent method is called by the event source for all registered event sinks to handle event data.

Parameters
[in]oSourcePointer to calling event source interface.
[in]pvEventDataPointer to event specific data.
Returns
Returns a standard result code. If ERR_CANCELED is returned, the event source stops calling the following event sinks, but it depends on the behavior of the implementation if the CANCEL return will result i.e. in a break of action.

IMPORTANT: Keen in mind that HandleEvent may be called from different threads. If you are sure that the event you want to handle comes only from one thread and/or you use only local members and other threadsafe methods, nothing must be done. Otherwise the critical code must be protected.


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