diff options
| author | Charlie Blake | 2017-10-28 13:28:49 +0100 |
|---|---|---|
| committer | GitHub | 2017-10-28 13:28:49 +0100 |
| commit | 7b05ae6f24856a207f9d9ab3218f1b5e75343d74 (patch) | |
| tree | 4c7b3d779f29f5cef8a5eb1803441f1aa20ac0bd /src/main/command_line_helper.h | |
| parent | Merge pull request #13 from thecharlesblake/docs (diff) | |
| parent | Add RapidJSON to travis (diff) | |
| download | metasol-7b05ae6f24856a207f9d9ab3218f1b5e75343d74.tar.gz metasol-7b05ae6f24856a207f9d9ab3218f1b5e75343d74.zip | |
Merge pull request #14 from thecharlesblake/simple-black-hole
Simple black hole
Diffstat (limited to 'src/main/command_line_helper.h')
| -rw-r--r-- | src/main/command_line_helper.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/command_line_helper.h b/src/main/command_line_helper.h new file mode 100644 index 0000000..5694830 --- /dev/null +++ b/src/main/command_line_helper.h @@ -0,0 +1,36 @@ +// +// Created by thecharlesblake on 10/16/17. +// + +#ifndef SOLVITAIRE_COMMAND_LINE_HELPER_H +#define SOLVITAIRE_COMMAND_LINE_HELPER_H + +#include <boost/program_options.hpp> + +class command_line_helper { +public: + command_line_helper(); + bool parse(int argc, const char* argv[]); + const std::vector<std::string> get_input_files(); + const std::string get_solitaire_type(); + 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_no_sol_type_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<std::string> input_files; + std::string solitaire_type; + int random_deal; + bool help; +}; + +#endif //SOLVITAIRE_COMMAND_LINE_HELPER_H |
