Stride Reference Manual  - generated for commit 9643b11
InfectedFileViewer.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2018, Kuylen E, Willem L, Broeckhove J
15  */
16 
22 #include "InfectedFile.h"
23 #include "sim/event/Id.h"
24 
25 #include <iostream>
26 #include <spdlog/spdlog.h>
27 
28 namespace stride {
29 
30 class SimRunner;
31 
32 namespace viewers {
33 
36 {
37 public:
39  InfectedFileViewer(std::shared_ptr<SimRunner> runner, const std::string& output_prefix)
40  : m_infected(), m_infected_file(output_prefix), m_runner(std::move(runner))
41  {
42  }
43 
45  void Update(sim_event::Id id);
46 
47 private:
48  std::vector<unsigned int> m_infected;
50  std::shared_ptr<SimRunner> m_runner;
51 };
52 
53 } // namespace viewers
54 } // namespace stride
InfectedFileViewer(std::shared_ptr< SimRunner > runner, const std::string &output_prefix)
Instantiate cases viewer.
Id
Enumerates the event.
Definition: Id.h:30
void Update(sim_event::Id id)
Let viewer perform update.
STL namespace.
Viewer of Simulator for cases output.
std::shared_ptr< SimRunner > m_runner
Header for the InfectedFile class.
std::vector< unsigned int > m_infected
Produces a file with daily count of infected persons.
Definition: InfectedFile.h:33
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
Definition of EventId.