34 lines
860 B
C++
34 lines
860 B
C++
#ifndef SORT_CONTROLLER_HPP
|
|
#define SORT_CONTROLLER_HPP
|
|
|
|
#include <chrono>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
enum SortType {INSERTION = 0, MERGE, HEAP};
|
|
|
|
class SortController
|
|
{
|
|
public:
|
|
SortController();
|
|
void CheckArguments(int argc, char* arguments[]);
|
|
void ReadWordFile(void);
|
|
void RunBenchmarks(void);
|
|
protected:
|
|
;
|
|
private:
|
|
std::string filename;
|
|
SortType currentType;
|
|
std::chrono::duration<double> sortTime;
|
|
std::vector<std::string> newWordList;
|
|
std::vector<std::string> originalWordList;
|
|
int lineCount;
|
|
bool defaultFile, defaultOnly, fileGiven, allLists, sortGiven;
|
|
void Benchmarking(void);
|
|
void BenchmarkingAll(void);
|
|
void OutputResult(void);
|
|
void EchoSortTime(std::string outputFilename);
|
|
void WriteOutputToFile(std::string outputFilename);
|
|
};
|
|
|
|
#endif |