From 5864e5abc43b201c3801fa39a2fcaf9e3a9e8914 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 27 Feb 2022 12:54:10 +0100 Subject: refactor: use dependency injection --- src/interfaces/argument_parser.hpp | 23 +++++++++++++++++++++++ src/interfaces/randomization.hpp | 31 +++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/interfaces/argument_parser.hpp create mode 100644 src/interfaces/randomization.hpp (limited to 'src/interfaces') diff --git a/src/interfaces/argument_parser.hpp b/src/interfaces/argument_parser.hpp new file mode 100644 index 0000000..222d9e0 --- /dev/null +++ b/src/interfaces/argument_parser.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "interfaces/randomization.hpp" + +#include +#include +#include +#include + +struct ParsedArguments +{ + std::shared_ptr random_gen = nullptr; +}; + +class IArgumentParser +{ +public: + virtual ParsedArguments + parse(const std::vector