-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminion.h
74 lines (59 loc) · 1.51 KB
/
minion.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef MINION_H
#define MINION_H
#include <string>
#include <cstdlib>
#include <sstream>
using namespace std;
class minion {
public:
minion(){
environment = "";
script_name = "";
arguments = "";
}
minion(std::string env, std::string sname, std::string arg){
environment = env;
script_name = sname;
arguments = arg;
}
~minion(){}
void execute();
void execute(std::string);
/**
* Set runtime environment
**/
void set_env(std::string env){
environment = env;
}
/**
* Location of script for env to run
**/
void set_script(std::string sname){
script_name = sname;
}
/**
* Script command line arguments.
**/
void set_args(std::string args){
arguments = args;
}
/**
* Return the execution as a string
**/
std::string to_string(){
std::stringstream ss;
ss
<< environment
<< " "
<< script_name
<< " "
<< arguments;
return ss.str();
}
private:
std::string environment,
script_name,
arguments;
std::string format_test_string(std::string);
};
#endif