aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/argument_parser.hpp
blob: 6415422ba9642bc2a2429d81b4f3d3d110b15a25 (plain)
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
#pragma once

#include "interfaces/randomization.hpp"

#include <getopt.h>
#include <memory>
#include <string_view>
#include <vector>

struct ParsedArguments
{
	std::shared_ptr<IRandomNumberGenerator> random_gen = nullptr;
};

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IArgumentParser
{
public:
	virtual ~IArgumentParser() noexcept = default;

	virtual auto parse(
		const std::vector<option> &options,
		const std::string_view &short_options,
		const int &argc,
		char *const *argv) noexcept
		-> ParsedArguments = 0; // NOLINT(cppcoreguidelines-avoid-c-arrays,
								// modernize-avoid-c-arrays)
};