Add sorting capacity
This commit is contained in:
@@ -13,6 +13,12 @@ namespace platform {
|
||||
Result(const string& path, const string& filename);
|
||||
json load();
|
||||
string to_string() const;
|
||||
string getFilename() const { return filename; };
|
||||
string getDate() const { return date; };
|
||||
double getScore() const { return score; };
|
||||
string getTitle() const { return title; };
|
||||
double getDuration() const { return duration; };
|
||||
string getModel() const { return model; };
|
||||
private:
|
||||
string path;
|
||||
string filename;
|
||||
@@ -24,14 +30,21 @@ namespace platform {
|
||||
};
|
||||
class Results {
|
||||
public:
|
||||
explicit Results(const string& path) : path(path) { load(); };
|
||||
explicit Results(const string& path, const int max) : path(path), max(max) { load(); };
|
||||
void manage();
|
||||
private:
|
||||
string path;
|
||||
int max;
|
||||
vector<Result> files;
|
||||
void load(); // Loads the list of results
|
||||
void show();
|
||||
int menu();
|
||||
void show() const;
|
||||
int getIndex(const string& intent) const;
|
||||
void menu();
|
||||
void sortList();
|
||||
void sortDate();
|
||||
void sortScore();
|
||||
void sortModel();
|
||||
void sortDuration();
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user