-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSserver.h
More file actions
40 lines (32 loc) · 813 Bytes
/
Copy pathSserver.h
File metadata and controls
40 lines (32 loc) · 813 Bytes
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
#ifndef SSERVER_H
#define SSERVER_H
#include <vector>
#include <string>
#include <unordered_map>
#include <iostream>
using namespace std;
class Server
{
public:
Server();
void hasher(char*);
int liner(char*);
bool ifend();
int process(char*);
vector <string> lines; // vector of code lines
void print();
string item = ""; //vector of lines' items
hash <string> hsh; // hashing the string
bool if_hash_equal();
void setPrevAndCurrent();
void set_sum();
bool chk_sum(int);
virtual ~Server();
private:
size_t sum=0;
size_t current=0;
size_t hasha=0;
size_t prev=0;
string new_data="";
};
#endif // SERVER_H