-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperators.h
More file actions
64 lines (50 loc) · 1.58 KB
/
Operators.h
File metadata and controls
64 lines (50 loc) · 1.58 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <string>
#include <utility>
#include <vector>
#include "Worker.h"
#include <algorithm>
#ifndef TASK_33_OPERATORS_H
#define TASK_33_OPERATORS_H
using namespace std;
class Readfile: public Worker{
private:
string in_file_name;
public:
explicit Readfile(string file_name):in_file_name(move(file_name)){};
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
};
class Writefile: public Worker{
private:
std::string out_file_name;
public:
explicit Writefile(string file_name):out_file_name(move(file_name)){};
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
};
class Grep: public Worker{
private:
string word;
public:
explicit Grep(string word) : word(move(word)) {};
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
}; //save string only with word
class Sort: public Worker{
public:
explicit Sort()= default;
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
}; //sort tokens
class Replace: public Worker{
private:
string word_1;
string word_2;
public:
explicit Replace(string word1,string word2) : word_1(move(word1)),word_2(move(word2)) {};
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
};
class Dump: public Worker{
private:
string out_file_name;
public:
explicit Dump(string file_name):out_file_name(move(file_name)){};
void run(vector<vector<string>> &in,vector<vector<string>> &out) override;
};
#endif //TASK_33_OPERATORS_H