16 using namespace Utils;
18 Record::Record(std::shared_ptr<Utils::Configuration> c, std::string n) : name(n), conf(c)
20 record = conf->getBoolValue(
"global",
"record",
true);
27 std::string
filename = conf->getFilePrefix() + name +
"Report.txt";
28 std::string path = folder +
"/" +
filename;
30 file.open(path, std::ios_base::app);
31 file <<
"report for "<< name <<
" ("<<vector.size()<<
"entries):\n";
32 for (
unsigned int i = 0;
i < vector.size();
i++)
34 file << std::setfill(
' ') << std::setw(12) << std::setprecision(12);
35 file << vector[
i].first <<
": " << vector[
i].second <<
"\n";
44 vector.push_back(std::pair<double, double>(time, element));
void printToFile(std::string folder) const
void add(double time, double element)
Record(std::shared_ptr< Utils::Configuration > conf, std::string name)