argParser.h
1.24 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
#ifndef ARG_PARSER_H
#define ARG_PARSER_H
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <lavidlib/base/RuntimeException.h>
#define MAX_SIZE_PATH 256
using namespace std;
class ArgParser {
public:
ArgParser();
~ArgParser();
void readArgs(char** argv, int argc);
int getService();
int getLanguage();
int getPosition();
int getSize();
int getBackground();
int getMode();
int getOption();
string getInput();
string getInputSRT();
string getId();
private:
enum Services { _VIDEO_WITH_SRT = 1, _REC_VIDEO, _TEXT, _ONLY_SRT, _REC_AUDIO, _WITHOUT_MIXER };
enum Languages { _PORTUGUESE = 1, _GLOSA };
enum Positions { _TOP_LEFT = 1, _TOP_RIGHT, _BOTTOM_RIGHT, _BOTTOM_LEFT };
enum Sizes { _SMALL = 1, _MEDIUM, _LARGE };
enum Background { _OPAQUE, _TRANSPARENT };
enum Options { _NO_MIXER = 1 };
enum Mode { _DEVEL = 1 , _PROD };
struct globalArgs_t {
Services service;
Languages language;
Positions position;
Sizes size;
Background back;
Options mixer;
Mode mode;
string input;
string input_srt;
string id;
}globalArgs;
void help();
void returnErr(string option);
};
#endif /* ARG_PARSER_H */