Stride Reference Manual  - generated for commit 9643b11
InfectedFile.h
Go to the documentation of this file.
1 /*
2  * This is free software: you can redistribute it and/or modify it
3  * under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, either version 3 of the License, or
5  * any later version.
6  * The software is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  * You should have received a copy of the GNU General Public License
11  * along with the software. If not, see <http://www.gnu.org/licenses/>.
12  *
13  * Copyright 2017, Kuylen E, Willem L, Broeckhove J
14  */
15 
21 #pragma once
22 
23 #include <fstream>
24 #include <string>
25 #include <vector>
26 
27 namespace stride {
28 namespace output {
29 
34 {
35 public:
37  explicit InfectedFile(const std::string& output_dir = "output");
38 
40  ~InfectedFile();
41 
43  void Print(const std::vector<unsigned int>& infectionCounts);
44 
45 private:
46  std::ofstream m_fstream;
47 };
48 
49 } // namespace output
50 } // namespace stride
InfectedFile(const std::string &output_dir="output")
Constructor: initialize.
~InfectedFile()
Destructor: close the file stream.
std::ofstream m_fstream
The file stream.
Definition: InfectedFile.h:46
Produces a file with daily count of infected persons.
Definition: InfectedFile.h:33
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
void Print(const std::vector< unsigned int > &infectionCounts)
Print the given cases with corresponding tag.