Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
runner_message.h
Go to the documentation of this file.
1#pragma once
2#include "event_message.h"
3
4namespace hgps {
5
7enum class RunnerAction {
9 start,
10
13
16
18 run_end,
19
21 finish
22};
23
25struct RunnerEventMessage final : public EventMessage {
26
28
32 RunnerEventMessage(std::string sender, RunnerAction run_action) noexcept;
33
38 RunnerEventMessage(std::string sender, RunnerAction run_action, double elapsed) noexcept;
39
44 RunnerEventMessage(std::string sender, RunnerAction run_action, unsigned int run) noexcept;
45
51 RunnerEventMessage(std::string sender, RunnerAction run_action, unsigned int run,
52 double elapsed) noexcept;
53
56
58 double elapsed_ms{};
59
60 int id() const noexcept override;
61
62 std::string to_string() const override;
63
64 void accept(EventMessageVisitor &visitor) const override;
65};
66} // 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
RunnerAction
Enumerates the simulation executive actions.
Definition runner_message.h:7
@ finish
Finish simulation experiment.
@ cancelled
Simulation experiment has been cancelled.
@ run_begin
Begin a new simulation run.
@ run_end
End a simulation run.
@ start
Simulation has started, time = start.
Global namespace.
Definition column_iterator.h:123
Simulation event messages interface.
Definition event_message.h:29
Implements the simulation executive event message data type.
Definition runner_message.h:25
std::string to_string() const override
Create a string representation of this instance.
Definition runner_message.cpp:23
int id() const noexcept override
Gets the unique message type identifier.
Definition runner_message.cpp:21
double elapsed_ms
The action elapsed time in milliseconds.
Definition runner_message.h:58
RunnerAction action
The simulation executive action.
Definition runner_message.h:55
void accept(EventMessageVisitor &visitor) const override
Double dispatch the message using a visitor implementation.
Definition runner_message.cpp:39