-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDummyRePair.h
45 lines (32 loc) · 869 Bytes
/
DummyRePair.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
//
// Created by ale on 02-07-20.
//
#ifndef RRPAIR_DUMMYREPAIR_H
#define RRPAIR_DUMMYREPAIR_H
#include <string>
namespace big_repair {
class DummyRepair {
public:
DummyRepair() = default;
DummyRepair(const std::string& exc){
_exce = exc;
}
DummyRepair(const DummyRepair& D){
_exce = D._exce;
}
DummyRepair& operator=(const DummyRepair& D){
_exce = D._exce;
return *this;
}
~DummyRepair() = default;
// apply compression algorithm to the file
int apply(const std::string &file){
std::string command_compressing= _exce +" "+ file;
if(system(command_compressing.c_str()) < 0) return -1;
return 1;
}
private:
std::string _exce;
};
}
#endif //RRPAIR_DUMMYREPAIR_H