Add total number of results in manage
This commit is contained in:
parent
1f705f6018
commit
858664be2d
@ -11,7 +11,7 @@
|
||||
namespace platform {
|
||||
|
||||
ManageResults::ManageResults(int numFiles, const string& model, const string& score, bool complete, bool partial, bool compare) :
|
||||
numFiles{ numFiles }, complete{ complete }, partial{ partial }, compare{ compare }, results(Results(Paths::results(), model, score, complete, partial, compare))
|
||||
numFiles{ numFiles }, complete{ complete }, partial{ partial }, compare{ compare }, results(Results(Paths::results(), model, score, complete, partial))
|
||||
{
|
||||
indexList = true;
|
||||
openExcel = false;
|
||||
@ -37,8 +37,11 @@ namespace platform {
|
||||
exit(0);
|
||||
}
|
||||
auto temp = ConfigLocale();
|
||||
cout << Colors::GREEN() << "Results found: " << numFiles << endl;
|
||||
cout << "-------------------" << endl;
|
||||
string suffix = numFiles != results.size() ? " of " + to_string(results.size()) : "";
|
||||
stringstream oss;
|
||||
oss << "Results on screen: " << numFiles << suffix;
|
||||
cout << Colors::GREEN() << oss.str() << endl;
|
||||
cout << string(oss.str().size(), '-') << endl;
|
||||
if (complete) {
|
||||
cout << Colors::MAGENTA() << "Only listing complete results" << endl;
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace platform {
|
||||
Results::Results(const string& path, const string& model, const string& score, bool complete, bool partial, bool compare) :
|
||||
path(path), model(model), scoreName(score), complete(complete), partial(partial), compare(compare)
|
||||
Results::Results(const string& path, const string& model, const string& score, bool complete, bool partial) :
|
||||
path(path), model(model), scoreName(score), complete(complete), partial(partial)
|
||||
{
|
||||
load();
|
||||
maxModel = (*max_element(files.begin(), files.end(), [](const Result& a, const Result& b) { return a.getModel().size() < b.getModel().size(); })).getModel().size();
|
||||
|
@ -11,13 +11,13 @@ namespace platform {
|
||||
|
||||
class Results {
|
||||
public:
|
||||
Results(const string& path, const string& model, const string& score, bool complete, bool partial, bool compare);
|
||||
Results(const string& path, const string& model, const string& score, bool complete, bool partial);
|
||||
void sortDate();
|
||||
void sortScore();
|
||||
void sortModel();
|
||||
void sortDuration();
|
||||
int maxModelSize() const { return maxModel; };
|
||||
void hideResult(int index, const string& path);
|
||||
void hideResult(int index, const string& pathHidden);
|
||||
void deleteResult(int index);
|
||||
int size() const;
|
||||
bool empty() const;
|
||||
@ -30,7 +30,6 @@ namespace platform {
|
||||
string scoreName;
|
||||
bool complete;
|
||||
bool partial;
|
||||
bool compare;
|
||||
int maxModel;
|
||||
vector<Result> files;
|
||||
void load(); // Loads the list of results
|
||||
|
Loading…
Reference in New Issue
Block a user