Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
info_message.h
Go to the documentation of this file.
1#pragma once
2#include "event_message.h"
3
4namespace hgps {
5
7enum class ModelAction {
9 start,
10
12 update,
13
15 stop
16};
17
19struct InfoEventMessage final : public EventMessage {
20
21 InfoEventMessage() = delete;
22
28 InfoEventMessage(std::string sender, ModelAction action, unsigned int run, int time) noexcept;
29
36 InfoEventMessage(std::string sender, ModelAction action, unsigned int run, int time,
37 std::string msg) noexcept;
38
41
43 const int model_time{};
44
46 const std::string message;
47
48 int id() const noexcept override;
49
50 std::string to_string() const override;
51
52 void accept(EventMessageVisitor &visitor) const override;
53};
54
55namespace detail {
57std::string model_action_str(ModelAction action);
58} // namespace detail
59} // namespace hgps
Event message types visitor interface (double dispatcher)
Definition event_visitor.h:11
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
ModelAction
Enumerates simulation model actions.
Definition info_message.h:7
@ update
Simulation time has updated, time = time + 1.
@ start
Simulation has started, time = start.
@ stop
Simulation has stopped, time = end.
Global namespace.
Definition column_iterator.h:123
Simulation event messages interface.
Definition event_message.h:29
Implements the simulation information event message data type.
Definition info_message.h:19
const std::string message
Gets the notification message.
Definition info_message.h:46
const ModelAction model_action
Gets the source action value.
Definition info_message.h:40
int id() const noexcept override
Gets the unique message type identifier.
Definition info_message.cpp:17
void accept(EventMessageVisitor &visitor) const override
Double dispatch the message using a visitor implementation.
Definition info_message.cpp:32
const int model_time
Gets the associated Simulation time.
Definition info_message.h:43
std::string to_string() const override
Create a string representation of this instance.
Definition info_message.cpp:19