-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyClientHandler.h
46 lines (36 loc) · 1.08 KB
/
MyClientHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef BIUPROJECT2_MYCLIENTHANDLER_H
#define BIUPROJECT2_MYCLIENTHANDLER_H
#include <string>
#include <string.h>
#include <thread>
#include <algorithm>
#include <sstream>
#include <unistd.h>
#include "Solver.h"
#include "ClientHandler.h"
#include "CacheManager.h"
#include "SearchableMatrix.h"
#include "MyParallelServer.h"
#include "SolverToSearcherAdapter.h"
#include "BestFirstSearch.h"
class MyClientHandler : public ClientHandler {
private:
//// Members:
Solver<ISearchable<std::pair<int,int>>*,State<std::pair<int,int>>*> *solver;
CacheManager *cacheManager;
//// Private Functions:
std::string GetPath(State<std::pair<int,int>>*);
std::string Read(int);
std::size_t GetHashOfString(std::string);
public:
//// Constructor:
MyClientHandler
(Solver<ISearchable<std::pair<int, int>> *,State<std::pair<int, int>> *> *solver,
CacheManager *cacheManager) {
this->cacheManager = cacheManager;
this->solver = solver;
}
//// Public Functions:
void handleClient(int i) override;
};
#endif //BIUPROJECT2_MYCLIENTHANDLER_H