Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
host::EventMonitor Class Referencefinal

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

#include <event_monitor.h>

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

Public Member Functions

 EventMonitor ()=delete
 
 EventMonitor (hgps::EventAggregator &event_bus, ResultWriter &result_writer)
 Initialises a new instance of the host::EventMonitor class. More...
 
 ~EventMonitor () noexcept
 Destroys a host::EventMonitor instance. More...
 
void stop () noexcept
 Stops the monitor, no new messages are processed after stop. More...
 
void visit (const hgps::RunnerEventMessage &message) override
 Visits a hgps::RunnerEventMessage message type. More...
 
void visit (const hgps::InfoEventMessage &message) override
 Visits a hgps::InfoEventMessage message type. More...
 
void visit (const hgps::ErrorEventMessage &message) override
 Visits a hgps::ErrorEventMessage message type. More...
 
void visit (const hgps::ResultEventMessage &message) override
 Visits a hgps::ResultEventMessage message type. More...
 
- Public Member Functions inherited from hgps::EventMessageVisitor
 EventMessageVisitor ()=default
 Initialises a new instance of the visitor class. More...
 
 EventMessageVisitor (const EventMessageVisitor &)=delete
 
EventMessageVisitoroperator= (const EventMessageVisitor &)=delete
 
 EventMessageVisitor (EventMessageVisitor &&)=delete
 
EventMessageVisitoroperator= (EventMessageVisitor &&)=delete
 
virtual ~EventMessageVisitor ()
 Destroy an instance of the visitor class. More...
 

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 host::ResultWriter instance provide at construction.

Constructor & Destructor Documentation

◆ EventMonitor() [1/2]

host::EventMonitor::EventMonitor ( )
delete

◆ EventMonitor() [2/2]

host::EventMonitor::EventMonitor ( hgps::EventAggregator event_bus,
ResultWriter result_writer 
)

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

Parameters
event_busThe message bus instance to monitor
result_writerThe results message writer instance
Here is the call graph for this function:

◆ ~EventMonitor()

host::EventMonitor::~EventMonitor ( )
noexcept

Destroys a host::EventMonitor instance.

Here is the call graph for this function:

Member Function Documentation

◆ stop()

void host::EventMonitor::stop ( )
noexcept

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

Here is the caller graph for this function:

◆ visit() [1/4]

void host::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/4]

void host::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() [3/4]

void host::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() [4/4]

void host::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: