-
Notifications
You must be signed in to change notification settings - Fork 53
/
flags.hpp
41 lines (33 loc) · 748 Bytes
/
flags.hpp
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
//
// Created by Ameen Maali on 6/1/20.
//
#ifndef URLDEDUPE_FLAGS_HPP
#define URLDEDUPE_FLAGS_HPP
#include <string>
#include "utils.hpp"
struct Flag
{
std::string short_name;
std::string long_name;
std::string usage;
bool required;
bool is_switch;
};
struct Option
{
Flag flag;
std::string value;
};
struct CliOptions
{
bool regex_mode {false};
bool similar_mode {false};
bool query_strings_only {false};
bool no_extensions_only {false};
std::string filename {};
};
std::vector<Option> parse_flags(int argc, char **argv);
void print_version(const std::string &version);
void print_usage();
void parse_cli_options(const Option &option, CliOptions &cli_options);
#endif // URLDEDUPE_FLAGS_HPP