blob: bee7c847b1ca2212daf894db5e7f1d55a5b26e2f (
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
|
#pragma once
#include "DI/auto_wirable.hpp"
#include "interfaces/argument_parser.hpp"
#include "interfaces/randomization.hpp"
#include <getopt.h>
#include <string_view>
#include <vector>
class ArgumentParser
: public IArgumentParser,
public AutoWirable<IArgumentParser, ArgumentParser, IRandomNumberGeneratorFactory>
{
public:
explicit ArgumentParser(
IRandomNumberGeneratorFactory random_number_generator_factory) noexcept;
auto parse(
const std::vector<option> &options, const std::string_view &short_options,
const int &argc,
char *const *argv) noexcept -> ParsedArguments override; // NOLINT(cppcoreguidelines-avoid-c-arrays,
// modernize-avoid-c-arrays)
private:
IRandomNumberGeneratorFactory _random_number_generator_factory;
};
|