-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.h
More file actions
37 lines (26 loc) · 780 Bytes
/
cli.h
File metadata and controls
37 lines (26 loc) · 780 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
#pragma once
#include "filter.h"
#include <string_view>
#include <vector>
#include <filesystem>
#include <memory>
namespace fs = std::filesystem;
class CLI {
public:
CLI(int args_number, char **args_vector);
void ParseArgs(int args_number, char **args_vector);
std::vector<std::unique_ptr<Filter>> MakeFiltersVector();
std::string_view GetInputFile() const;
std::string_view GetOutputFile() const;
bool IsParsed() const;
private:
struct FilterStruct {
std::string_view name;
std::vector<std::string_view> parameters;
};
std::string_view input_file_;
std::string_view output_file_;
std::vector<FilterStruct> filters_vector_;
std::vector<std::unique_ptr<Filter>> filter_ptrs_;
bool is_parsed_ = true;
};