ADTF
Loading...
Searching...
No Matches
adtf::ucom::ant::cEventSource Class Reference

#include <event_source.h>

Inherits adtf::ucom::catwo::object< IEventSource >.

Public Member Functions

tResult FireEvent (const void *pvEventData) const
 
tResult RegisterEventSink (IEventSink &oEventSink)
 
tResult UnregisterEventSink (IEventSink &oEventSink)
 
- Public Member Functions inherited from adtf::ucom::catwo::object< IEventSource >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

The class cEventSource provides a basic implementation of IEventSource and wraps code to manage lists of pointers to IEventSink interfaces.

This will show you how to define such simple event.

Warning
: This is only a simple Internal Event pattern and is different from the IKernel Signals !!

Member Function Documentation

◆ FireEvent()

tResult adtf::ucom::ant::cEventSource::FireEvent ( const void * pvEventData) const

Fire event. The FireEvent method sends an event to all registered event sinks. If one event sink returns ERR_CANCELED, the calling loop is aborted.

Parameters
pvEventData[in] Pointer to event specific data.
Returns
Returns a standard result code. If cancelled, ERR_CANCELED is returned.

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