Summary list

This commit is contained in:
2023-08-13 16:19:17 +02:00
parent 90c92e5c56
commit 2729b92f06
6 changed files with 145 additions and 2 deletions

38
src/Platform/Results.h Normal file
View File

@@ -0,0 +1,38 @@
#ifndef RESULTS_H
#define RESULTS_H
#include <map>
#include <vector>
#include <string>
#include <nlohmann/json.hpp>
namespace platform {
using namespace std;
using json = nlohmann::json;
class Result {
public:
Result(const string& path, const string& filename);
json load();
string to_string() const;
private:
string path;
string filename;
string date;
double score;
string title;
double duration;
string model;
};
class Results {
public:
explicit Results(const string& path) : path(path) { load(); };
void manage();
private:
string path;
vector<Result> files;
void load(); // Loads the list of results
void show();
int menu();
};
};
#endif