Mbed OS Reference
Loading...
Searching...
No Matches
ChainableEventHandler< T > Class Template Reference

Base class for chainable EventHandlers. More...

#include <ChainableEventHandler.h>

Public Member Functions

bool addEventHandler (T *event_handler)
 Add an EventHandler to be notified of events sent to this ChainableEventHandler. More...
 
void removeEventHandler (T *event_handler)
 Remove an EventHandler previously added with addEventHandler. More...
 
bool isEventHandlerPresent (T *event_handler)
 Test if an event handler is present in the chain or not. More...
 

Detailed Description

template<typename T>
class ChainableEventHandler< T >

Base class for chainable EventHandlers.

Acts as a collection of discrete EventHandlers that can be linked together and notified when relevant events happen

Definition at line 29 of file ChainableEventHandler.h.

Member Function Documentation

◆ addEventHandler()

bool addEventHandler ( T *  event_handler)

Add an EventHandler to be notified of events sent to this ChainableEventHandler.

Parameters
[in]event_handlerHandler to add to chain
Return values
trueif adding EventHandler was successful, false otherwise

Definition at line 54 of file ChainableEventHandler.h.

◆ removeEventHandler()

void removeEventHandler ( T *  event_handler)

Remove an EventHandler previously added with addEventHandler.

Parameters
[in]event_handlerPointer to event handler to remove

Definition at line 74 of file ChainableEventHandler.h.

◆ isEventHandlerPresent()

bool isEventHandlerPresent ( T *  event_handler)

Test if an event handler is present in the chain or not.

Parameters
[in]event_handlerPointer to event handler to check

Definition at line 102 of file ChainableEventHandler.h.