18 std::vector<std::string> arguments;
19 std::vector<std::string> non_flag_arguments;
39 bool have_flag(std::string
const &flag)
const;
Wraps a vector of string CL arguments with some helpful functionality.
Definition argument_parser.h:15
bool have_correct_number_of_filenames() const
Check that the correct number of filename arguments are provided (either 2 or 3 non-flag arguments)
Definition argument_parser.cpp:136
const char * input_filename()
Gets the input filename.
Definition argument_parser.cpp:108
bool have_flag(std::string const &flag) const
Searches the arguments for the flag provided.
Definition argument_parser.cpp:80
static bool is_a_flag_argument(std::string arg)
Check whether an argument is a flag (starts '-')
Definition argument_parser.cpp:76
std::vector< std::string > input_filenames()
Get all input filenames.
Definition argument_parser.cpp:117
const char * grid_filename()
Gets the grid filename.
Definition argument_parser.cpp:101
const char * output_filename()
Gets the output filename.
Definition argument_parser.cpp:89
bool compressed_output() const
Return true if the user has requested the output file we written in compressed format.
Definition argument_parser.cpp:140
bool has_grid_filename() const
Have we been provided with a grid filename?
Definition argument_parser.cpp:115
void check_files_can_be_accessed()
Check that all input and output files can be accessed with the correct privileges.
Definition argument_parser.cpp:127
Performs the argument parsing and returns an ArgumentNamespace.
Definition argument_parser.h:122
static ArgumentNamespace parse_args(int n_args, char *arg_ptrs[])
Parse the command line arguments and perform relevant actions.
Definition argument_parser.cpp:12
static void print_help_message()
Definition argument_parser.cpp:45
static void print_version()
Definition argument_parser.cpp:58
Type definitions and global constants.