libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
GblIEventReceiverClass Struct Reference

#include <gimbal_ievent_receiver.h>

Inheritance diagram for GblIEventReceiverClass:
Collaboration diagram for GblIEventReceiverClass:

Data Fields

GblInterface base
 
GBL_RESULT(* pFnReceiveEvent )(GblIEventReceiver *pSelf, GblIEventReceiver *pDest, GblEvent *pEvent)
 
- Data Fields inherited from GblInterface
GblClass base
 
size_t outerClassOffset_
 
- Data Fields inherited from GblClass
struct { 
 
   uintptr_t   metaClassInfo 
 
private_ 
 

Additional Inherited Members

Detailed Description

GblClass structure for GblIEventReceiver.

A GblIEventReceiver is a type implementing the basic interface required for event processing. There are typically two different types of receivers:

  • Handlers: intended recipients of a GblEvent
  • Filters: observers which can intercept events not directly sent to them.

The same interface can be used to implement both types of receivers, depending on whether the self parameter is the same instance which is the destination receiver of GblIEventReceiverClass::pFnReceiveEvent().

Once received, a GblEvent may either be ignored, allowing to potentially propagate onward through other chained receivers, or it may be "accepted," which terminates its propagation and marks it as handled.

See also
GblEvent, GblObject

Definition at line 52 of file gimbal_ievent_receiver.h.

Field Documentation

◆ base

GblInterface GblIEventReceiverClass::base

Inherited base class GblIEventReceiver.

Definition at line 52 of file gimbal_ievent_receiver.h.

◆ pFnReceiveEvent

GBL_RESULT(* GblIEventReceiverClass::pFnReceiveEvent) (GblIEventReceiver *pSelf, GblIEventReceiver *pDest, GblEvent *pEvent)

Invoked any time an event is received or intercepted by the given instance.

Definition at line 54 of file gimbal_ievent_receiver.h.


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