-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArgParser.h
46 lines (35 loc) · 994 Bytes
/
ArgParser.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
//
// Created by vincenzo on 27/10/22.
//
#ifndef CHIPEMULATOR_ARGPARSER_H
#define CHIPEMULATOR_ARGPARSER_H
#include <vector>
#include <string_view>
#include <string>
class ArgParser {
public:
ArgParser(int argc, char *argv[]){
argumentLength=argc;
argvPointer=argv;
};
void parse();
const std::string &getRomPath() const;
int getFrequency() const;
bool isHorizontalScanLinesEnabled() const;
bool isVerticalScanLinesEnabled() const;
bool isCrossingLineEnabled() const;
bool isCrossingLineDirection() const;
private:
int argumentLength;
char ** argvPointer;
std::string romPath;
bool isRom= false;
int frequency=500;
bool horizontalScanLinesEnabled= false;
bool verticalScanLinesEnabled= false;
bool crossingLineEnabled= false;
bool crossingLineDirection= false;
static std::string nextArgument(const std::string_view &stringView);
void printUsage();
};
#endif //CHIPEMULATOR_ARGPARSER_H