sorting-algorithms/include/sort_controller.hpp

34 lines
860 B
C++
Raw Normal View History

2023-03-05 03:05:41 -06:00
#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