Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps::EventMonitor Class Referencefinal

Defined the event monitor class used for processing Health-GPS event messages. More...

#include <event_monitor.h>

Inheritance diagram for hgps::EventMonitor:
[legend]
Collaboration diagram for hgps::EventMonitor:
[legend]

Public Member Functions

 EventMonitor ()=delete
 
 EventMonitor (hgps::EventAggregator &event_bus, ResultWriter &result_writer, IndividualIDTrackingWriter *individual_tracking_writer=nullptr)
 Initialises a new instance of the hgps::EventMonitor class.
 
 ~EventMonitor () noexcept
 Destroys a hgps::EventMonitor instance.
 
void stop () noexcept
 Stops the monitor, no new messages are processed after stop.
 
void visit (const hgps::RunnerEventMessage &message) override
 Visits a hgps::RunnerEventMessage message type.
 
void visit (const hgps::InfoEventMessage &message) override
 Visits a hgps::InfoEventMessage message type.
 
void visit (const hgps::ErrorEventMessage &message) override
 Visits a hgps::ErrorEventMessage message type.
 
void visit (const hgps::ResultEventMessage &message) override
 Visits a hgps::ResultEventMessage message type.
 
void visit (const hgps::IndividualTrackingEventMessage &message) override
 MAHIMA: Visits IndividualTrackingEventMessage (per-person CSV rows for same-person ID tracking)
 
- Public Member Functions inherited from hgps::EventMessageVisitor
 EventMessageVisitor ()=default
 Initialises a new instance of the visitor class.
 
 EventMessageVisitor (const EventMessageVisitor &)=delete
 
EventMessageVisitoroperator= (const EventMessageVisitor &)=delete
 
 EventMessageVisitor (EventMessageVisitor &&)=delete
 
EventMessageVisitoroperator= (EventMessageVisitor &&)=delete
 
virtual ~EventMessageVisitor ()=default
 Destroy an instance of the visitor class.
 

Detailed Description

Defined the event monitor class used for processing Health-GPS event messages.

All notification messages are written to the terminal, while the results messages are queued to be processed by the hgps::ResultWriter instance provide at construction. MAHIMA: When individual_id_tracking is enabled, optional IndividualIDTrackingWriter writes per-person CSV rows for same-person ID tracking across baseline/intervention.

Constructor & Destructor Documentation

◆ EventMonitor() [1/2]

hgps::EventMonitor::EventMonitor ( )
delete

◆ EventMonitor() [2/2]

hgps::EventMonitor::EventMonitor ( hgps::EventAggregator event_bus,
ResultWriter result_writer,
IndividualIDTrackingWriter individual_tracking_writer = nullptr 
)

Initialises a new instance of the hgps::EventMonitor class.

Parameters
event_busThe message bus instance to monitor
result_writerThe results message writer instance
individual_tracking_writerOptional writer for IndividualIDTracking CSV (nullptr if disabled)
Here is the call graph for this function:

◆ ~EventMonitor()

hgps::EventMonitor::~EventMonitor ( )
noexcept

Destroys a hgps::EventMonitor instance.

Here is the call graph for this function:

Member Function Documentation

◆ stop()

void hgps::EventMonitor::stop ( )
noexcept

Stops the monitor, no new messages are processed after stop.

Here is the caller graph for this function:

◆ visit() [1/5]

void hgps::EventMonitor::visit ( const hgps::ErrorEventMessage message)
overridevirtual

Visits a hgps::ErrorEventMessage message type.

Parameters
messageThe message instance to visit

Implements hgps::EventMessageVisitor.

Here is the call graph for this function:

◆ visit() [2/5]

void hgps::EventMonitor::visit ( const hgps::IndividualTrackingEventMessage message)
overridevirtual

MAHIMA: Visits IndividualTrackingEventMessage (per-person CSV rows for same-person ID tracking)

Parameters
messageThe message instance to visit

Implements hgps::EventMessageVisitor.

Here is the call graph for this function:

◆ visit() [3/5]

void hgps::EventMonitor::visit ( const hgps::InfoEventMessage message)
overridevirtual

Visits a hgps::InfoEventMessage message type.

Parameters
messageThe message instance to visit

Implements hgps::EventMessageVisitor.

Here is the call graph for this function:

◆ visit() [4/5]

void hgps::EventMonitor::visit ( const hgps::ResultEventMessage message)
overridevirtual

Visits a hgps::ResultEventMessage message type.

Parameters
messageThe message instance to visit

Implements hgps::EventMessageVisitor.

Here is the call graph for this function:

◆ visit() [5/5]

void hgps::EventMonitor::visit ( const hgps::RunnerEventMessage message)
overridevirtual

Visits a hgps::RunnerEventMessage message type.

Parameters
messageThe message instance to visit

Implements hgps::EventMessageVisitor.

Here is the call graph for this function:

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