From 577351eda5b7ed3ce9c2b4caf68d2f3923589451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Fri, 17 May 2024 18:32:01 +0200 Subject: [PATCH] put using json=nlohmann:ordered_json under namespace platform --- lib/libxlsxwriter | 2 +- src/best/BestResults.h | 3 ++- src/best/BestResultsExcel.h | 3 +-- src/best/Statistics.h | 4 ++-- src/main/Scores.h | 2 +- src/reports/DatasetsConsole.h | 1 - src/reports/DatasetsExcel.h | 3 +-- src/reports/ReportBase.h | 9 +++++---- src/reports/ReportExcel.h | 7 +++++-- src/results/ResultsDatasetExcel.h | 2 +- 10 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/libxlsxwriter b/lib/libxlsxwriter index 284b61b..26c4c20 160000 --- a/lib/libxlsxwriter +++ b/lib/libxlsxwriter @@ -1 +1 @@ -Subproject commit 284b61ba0b8930ad93003380defc4a0817b75079 +Subproject commit 26c4c20bab3b0187e203e775f9c9edc5d33d3b94 diff --git a/src/best/BestResults.h b/src/best/BestResults.h index d470948..375b936 100644 --- a/src/best/BestResults.h +++ b/src/best/BestResults.h @@ -2,8 +2,9 @@ #include #include -using json = nlohmann::ordered_json; namespace platform { + using json = nlohmann::ordered_json; + class BestResults { public: explicit BestResults(const std::string& path, const std::string& score, const std::string& model, const std::string& dataset, bool friedman, double significance = 0.05) diff --git a/src/best/BestResultsExcel.h b/src/best/BestResultsExcel.h index c0a9d0f..430ff7e 100644 --- a/src/best/BestResultsExcel.h +++ b/src/best/BestResultsExcel.h @@ -5,10 +5,9 @@ #include #include "reports/ExcelFile.h" -using json = nlohmann::ordered_json; namespace platform { - + using json = nlohmann::ordered_json; class BestResultsExcel : public ExcelFile { public: BestResultsExcel(const std::string& score, const std::vector& datasets); diff --git a/src/best/Statistics.h b/src/best/Statistics.h index a4ac016..1ac7364 100644 --- a/src/best/Statistics.h +++ b/src/best/Statistics.h @@ -5,9 +5,9 @@ #include #include -using json = nlohmann::ordered_json; - namespace platform { + using json = nlohmann::ordered_json; + struct WTL { int win; int tie; diff --git a/src/main/Scores.h b/src/main/Scores.h index 3053d4f..f54b35e 100644 --- a/src/main/Scores.h +++ b/src/main/Scores.h @@ -2,8 +2,8 @@ #define SCORES_H #include #include -#include #include +#include namespace platform { using json = nlohmann::ordered_json; class Scores { diff --git a/src/reports/DatasetsConsole.h b/src/reports/DatasetsConsole.h index 18dfdb9..4c1e972 100644 --- a/src/reports/DatasetsConsole.h +++ b/src/reports/DatasetsConsole.h @@ -8,7 +8,6 @@ namespace platform { using json = nlohmann::ordered_json; - class DatasetsConsole : public ReportsPaged { public: static const int BALANCE_LENGTH; diff --git a/src/reports/DatasetsExcel.h b/src/reports/DatasetsExcel.h index 11e419f..32b19e8 100644 --- a/src/reports/DatasetsExcel.h +++ b/src/reports/DatasetsExcel.h @@ -3,10 +3,9 @@ #include #include "reports/ExcelFile.h" -using json = nlohmann::ordered_json; namespace platform { - + using json = nlohmann::ordered_json; class DatasetsExcel : public ExcelFile { public: DatasetsExcel(); diff --git a/src/reports/ReportBase.h b/src/reports/ReportBase.h index 56ce32a..d6d227a 100644 --- a/src/reports/ReportBase.h +++ b/src/reports/ReportBase.h @@ -1,14 +1,14 @@ -#pragma once +#ifndef REPORTBASE_H +#define REPORTBASE_H +//#include "main/Scores.h" #include -#include #include #include "common/Paths.h" #include "common/Symbols.h" -using json = nlohmann::ordered_json; namespace platform { - + using json = nlohmann::ordered_json; class ReportBase { public: explicit ReportBase(json data_, bool compare); @@ -36,3 +36,4 @@ namespace platform { bool existBestFile = true; }; }; +#endif \ No newline at end of file diff --git a/src/reports/ReportExcel.h b/src/reports/ReportExcel.h index 5bf7110..94923a6 100644 --- a/src/reports/ReportExcel.h +++ b/src/reports/ReportExcel.h @@ -1,11 +1,13 @@ -#pragma once - +#ifndef REPORT_EXCEL_H +#define REPORT_EXCEL_H #include #include #include "common/Colors.h" #include "ReportBase.h" #include "ExcelFile.h" namespace platform { + using json = nlohmann::ordered_json; + class ReportExcel : public ReportBase, public ExcelFile { public: explicit ReportExcel(json data_, bool compare, lxw_workbook* workbook, lxw_worksheet* worksheet = NULL); @@ -22,3 +24,4 @@ namespace platform { void header_notes(int row); }; }; +#endif \ No newline at end of file diff --git a/src/results/ResultsDatasetExcel.h b/src/results/ResultsDatasetExcel.h index 78b4964..dfbc618 100644 --- a/src/results/ResultsDatasetExcel.h +++ b/src/results/ResultsDatasetExcel.h @@ -3,9 +3,9 @@ #include #include "reports/ExcelFile.h" -using json = nlohmann::ordered_json; namespace platform { + using json = nlohmann::ordered_json; class ResultsDatasetExcel : public ExcelFile { public: