1 #ifndef LICORNEA_ARGS_H_ 2 #define LICORNEA_ARGS_H_ 13 const char* executable_name_;
14 std::vector<const char*> args_;
16 std::ptrdiff_t arg_index_ = 0;
20 args_list(
int argc,
const char* argv[],
const std::string& usage);
22 [[noreturn]]
void usage_fail(
const std::string& error =
"")
const;
31 void get_args(
int argc,
const char* argv[],
const std::string& usage);
57 std::string
enum_arg(
const std::vector<std::string>& options);
58 inline std::string
enum_opt_arg(
const std::vector<std::string>& options,
const std::string& def)
61 bool bool_arg(
const std::string& expected);
62 inline bool bool_opt_arg(
const std::string& expected,
bool def =
false)
args_list(int argc, const char *argv[], const std::string &usage)
long int_opt_arg(long def)
double real_opt_arg(double def)
bool bool_arg(const std::string &expected)
bool has_next_arg() const
void usage_fail(const std::string &error="") const
std::string in_filename_arg()
std::string enum_arg(const std::vector< std::string > &options)
static std::unique_ptr< args_list > instance
std::string enum_opt_arg(const std::vector< std::string > &options, const std::string &def)
std::string out_filename_opt_arg(const std::string &def)
std::string out_dirname_arg()
std::string out_dirname_opt_arg(const std::string &def)
std::string out_filename_arg()
bool next_arg_is(const std::string &val) const
bool bool_opt_arg(const std::string &expected, bool def=false)
std::string in_filename_opt_arg(const std::string &def="")
view_index view_index_arg()
std::string string_opt_arg(const std::string &def="")
void get_args(int argc, const char *argv[], const std::string &usage)