Bridges the library's AlertManager to the wxWidgets event system: it subscribes to the AlertManager once and forwards every alert to the given wxEvtHandler as a wxEVT_RUMPI_LOGGER_UPDATE carrying a ready-to-display LoggerLineData.
More...
#include <LoggerEventForwarder.h>
Bridges the library's AlertManager to the wxWidgets event system: it subscribes to the AlertManager once and forwards every alert to the given wxEvtHandler as a wxEVT_RUMPI_LOGGER_UPDATE carrying a ready-to-display LoggerLineData.
This keeps the AlertManager subscription and the worker->UI thread hop out of the view code.
- Author
- Eddie O'Hagan
- Date
- 8/13/2026
◆ LoggerEventForwarder() [1/2]
| LoggerEventForwarder::LoggerEventForwarder |
( |
wxEvtHandler * |
handler | ) |
|
Subscribes to the AlertManager and stores the given UI handler so every alert is forwarded to it.
Keeps the subscription handle so the destructor can unsubscribe.
- Author
- Eddie O'Hagan
- Date
- 8/13/2026
Bridges the library's AlertManager to the wxWidgets event system: it subscribes to the AlertManager o...
Definition: LoggerEventForwarder.h:18
- Parameters
-
| [in] | handler | The UI event handler to forward alerts to. |
◆ LoggerEventForwarder() [2/2]
◆ ~LoggerEventForwarder()
| LoggerEventForwarder::~LoggerEventForwarder |
( |
| ) |
|
Unsubscribes from the AlertManager so a later alert can't call into a destroyed forwarder.
- Author
- Eddie O'Hagan
- Date
- 8/13/2026
◆ HandleLoggerEvent()
| void LoggerEventForwarder::HandleLoggerEvent |
( |
const RumPi::AlertEvent & |
loggerEvent | ) |
|
Builds a log line (pure data) from the alert and queues it to the UI handler as a wxEVT_RUMPI_LOGGER_UPDATE, so the actual UI update happens on the main thread.
- Author
- Eddie O'Hagan
- Date
- 8/13/2026
- Parameters
-
| [in] | loggerEvent | The alert event to forward. |
◆ operator=()
◆ mySubscriptionId
| std::size_t LoggerEventForwarder::mySubscriptionId |
|
protected |
Handle for the AlertManager subscription, so the destructor can unsubscribe.
◆ myWxEventHandler
| wxEvtHandler* LoggerEventForwarder::myWxEventHandler |
|
protected |
The UI event handler that receives forwarded log events.
The documentation for this class was generated from the following files: