aboutsummaryrefslogtreecommitdiff
path: root/src/main/command_line_helper.h
diff options
context:
space:
mode:
authorthecharlesblake2017-10-16 22:56:16 +0100
committerthecharlesblake2017-10-26 14:51:33 +0100
commitdc01ab729c749fbfd2421943198a038d126aa66c (patch)
tree7be21afce1e4cf67607a098e48a861256d69c159 /src/main/command_line_helper.h
parentAdd demo command line parsing (diff)
downloadmetasol-dc01ab729c749fbfd2421943198a038d126aa66c.tar.gz
metasol-dc01ab729c749fbfd2421943198a038d126aa66c.zip

Add simple black hole cmdline parse & err handling

Diffstat (limited to 'src/main/command_line_helper.h')
-rw-r--r--src/main/command_line_helper.h24
1 files changed, 23 insertions, 1 deletions
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.hpp>
-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<std::string> 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<std::string> input_files;
+ std::string solitaire_type;
+ bool random_deal;
+ bool help;
+};
#endif //SOLVITAIRE_COMMAND_LINE_HELPER_H