Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include "LogReader.h"
- #include "Request.h"
- using namespace std;
- const int TOP = 10;
- int main(int argc, char* argv[]){
- string logFile;
- bool graph;
- string graphFile;
- bool noim;
- bool timing;
- unsigned time;
- unsigned i = 1;
- while(i<argc)
- {
- if(argv[i]== "-g")
- {
- graph = true;
- i++;
- graphFile = argv[i];
- }
- else if(argv[i]== "-e")
- {
- noim = true;
- }
- else if(argv[i]== "-t")
- {
- timing = true;
- i++;
- time = atoi(argv[i]);
- }
- else
- {
- //todo
- }
- i++;
- }
- logFile = string(argv[i]);
- std::vector<Request> tab;
- LogReader::ReadFile(logFile, tab);
- Catalog c;
- if(graph)
- {
- c.FillGraphEdges(tab);
- GraphGenerator::GenerateGraph(c, graphFile);
- }
- else
- {
- c.FillHitsPerTarget(tab);
- c.ConvertMapToMultimap();
- RankingDisplayer::DisplayTopHits(c, TOP);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement