From 7f4712b292632becfc83bc0e887271b25fefd21a Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Wed, 3 Jan 2018 13:05:31 +0000 Subject: Refactor io dir structure --- src/main/input-output/input/command_line_helper.h | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/main/input-output/input/command_line_helper.h (limited to 'src/main/input-output/input/command_line_helper.h') diff --git a/src/main/input-output/input/command_line_helper.h b/src/main/input-output/input/command_line_helper.h new file mode 100644 index 0000000..fd1468c --- /dev/null +++ b/src/main/input-output/input/command_line_helper.h @@ -0,0 +1,40 @@ +// +// Created by thecharlesblake on 10/16/17. +// + +#ifndef SOLVITAIRE_COMMAND_LINE_HELPER_H +#define SOLVITAIRE_COMMAND_LINE_HELPER_H + +#include + +class command_line_helper { +public: + command_line_helper(); + + bool parse(int argc, const char* argv[]); + const std::vector get_input_files(); + const std::string get_solitaire_type(); + const std::string get_rules_file(); + int get_random_deal(); + bool get_help(); + +private: + bool assess_errors(); + bool assess_sol_type(); + void print_help(); + void print_no_input_error(); + void print_sol_type_rules_error(); + void print_rand_plus_input_err(); + + boost::program_options::options_description cmdline_options; + boost::program_options::options_description main_options; + boost::program_options::positional_options_description p; + + std::vector input_files; + std::string solitaire_type; + std::string rules_file; + int random_deal; + bool help; +}; + +#endif //SOLVITAIRE_COMMAND_LINE_HELPER_H -- cgit v1.2.1