From dc01ab729c749fbfd2421943198a038d126aa66c Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Mon, 16 Oct 2017 22:56:16 +0100 Subject: Add simple black hole cmdline parse & err handling --- src/main/command_line_helper.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/main/command_line_helper.h') diff --git a/src/main/command_line_helper.h b/src/main/command_line_helper.h index dc3b2b6..53a5a5e 100644 --- a/src/main/command_line_helper.h +++ b/src/main/command_line_helper.h @@ -7,6 +7,28 @@ #include -boost::program_options::options_description get_options_desc(); +class command_line_helper { +public: + command_line_helper(); + bool parse(int argc, const char* argv[]); + void print_help(); + void print_no_input_error(); + void print_no_sol_type_error(); + void print_rand_plus_input_err(); + const std::vector get_input_files(); + const std::string get_solitaire_type(); + bool get_random_deal(); + bool get_help(); + bool assess_errors(); +private: + 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; + bool random_deal; + bool help; +}; #endif //SOLVITAIRE_COMMAND_LINE_HELPER_H -- cgit v1.2.1