-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
47 lines (35 loc) · 880 Bytes
/
main.cpp
File metadata and controls
47 lines (35 loc) · 880 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
41
42
43
44
45
46
#include "./headers/input_parser.h"
#include "./headers/launch_record.h"
#include "./headers/launch_script.h"
#include "./headers/launch_replay.h"
#include "./headers/launch_pylibrary.h"
#include <string>
int main(int argc, char* argv[])
{
// argument parsing
InputParser input(argc, argv);
const std::string &filename = input.getCmdOption("-f");
if(input.cmdOptionExists("-s"))
{
launchScript(filename);
}
if(input.cmdOptionExists("-e"))
{
launchScriptReplay(filename);
}
if(input.cmdOptionExists("-r"))
{
launchRecord(filename);
}
if(input.cmdOptionExists("-p"))
{
lauchPythonLibrary();
}
return 0;
}
//TODO: can not change dir
//TODO: how to collect the output from system
/*
reference:
https://stackoverflow.com/questions/865668/parsing-command-line-arguments-in-c
*/