The class cEventSource provides a basic implementation of IEventSource and wraps code to manage lists of pointers to IEventSink interfaces. More...
#include <event_source.h>
Public Member Functions | |
tResult | FireEvent (const void *pvEventData) const |
Fire event. | |
tResult | RegisterEventSink (IEventSink &oEventSink) |
tResult | UnregisterEventSink (IEventSink &oEventSink) |
![]() | |
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. | |
![]() | |
ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Marks the IObject to be castable with the ucom_cast() | |
Private Attributes | |
std::vector< IEventSink * > | m_oEventSinks |
Additional Inherited Members | |
![]() | |
~IObject ()=default | |
Protected destructor --> Only the final implementation can be destroyed! | |
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.
Definition at line 30 of file event_source.h.
tResult 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.
pvEventData | [in] Pointer to event specific data. |
|
private |
Definition at line 33 of file event_source.h.