Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
error_message.h
Go to the documentation of this file.
1 #pragma once
2 #include "event_message.h"
3 
4 namespace hgps {
5 
7 struct ErrorEventMessage final : public EventMessage {
8 
9  ErrorEventMessage() = delete;
10 
16  ErrorEventMessage(std::string sender, unsigned int run, int time, std::string what) noexcept;
17 
19  const int model_time{};
20 
22  const std::string message;
23 
24  int id() const noexcept override;
25 
26  std::string to_string() const override;
27 
28  void accept(EventMessageVisitor &visitor) const override;
29 };
30 } // namespace hgps
Event message types visitor interface (double dispatcher)
Definition: event_visitor.h:10
Top-level namespace for Health-GPS C++ API.
Definition: analysis_definition.h:8
Global namespace.
Definition: jsonparser.h:88
Implements the simulation error event message data type.
Definition: error_message.h:7
const int model_time
Gets the associate Simulation time.
Definition: error_message.h:19
void accept(EventMessageVisitor &visitor) const override
Double dispatch the message using a visitor implementation.
Definition: error_message.cpp:19
const std::string message
Gets the error message.
Definition: error_message.h:22
std::string to_string() const override
Create a string representation of this instance.
Definition: error_message.cpp:12
int id() const noexcept override
Gets the unique message type identifier.
Definition: error_message.cpp:10
Simulation event messages interface.
Definition: event_message.h:25