30#ifndef __CLAW_ARGUMENTS_HPP__
31#define __CLAW_ARGUMENTS_HPP__
54 typedef std::map<std::string, std::list<std::string> >
59 explicit arguments(
const std::string& prog_name);
64 void parse(
int& argc,
char**& argv);
65 void parse(
int& argc,
char**& argv,
68 bool has_value(
const std::string& arg_name)
const;
74 bool get_bool(
const std::string& arg_name)
const;
76 double get_real(
const std::string& arg_name)
const;
77 const std::string&
get_string(
const std::string& arg_name)
const;
81 std::list<std::string>
87 void parse(
int& argc,
char**& argv,
bool always_allowed,
89 bool split_argument(
const std::string& arg, std::string& name,
90 std::string& value)
const;
92 void remove_null_arguments(
int& argc,
char**& argv)
const;
94 void process_boolean(
char*& arg,
bool always_allowed,
99 std::string m_program_name;
105 valued_arguments_map m_pairs;
void add_argument(const std::string &arg)
Add an argument in our list.
void parse(int &argc, char **&argv)
Parse arguments.
double get_real(const std::string &arg_name) const
Get the real value of an argument.
bool has_value(const std::string &arg_name) const
Tell if a value is associated to an argument.
const std::string & get_program_name() const
Get the name of the program.
bool only_integer_values(const std::string &arg_name) const
Tell if only integer values are associated to an argument.
std::list< std::string > get_all_of_string(const std::string &arg_name) const
Get all string values of an argument.
bool get_bool(const std::string &arg_name) const
Get the boolean state of an argument.
const std::string & get_string(const std::string &arg_name) const
Get the string value of an argument.
std::list< int > get_all_of_integer(const std::string &arg_name) const
Get all integer values of an argument.
std::list< double > get_all_of_real(const std::string &arg_name) const
Get all real values of an argument.
int get_integer(const std::string &arg_name) const
Get the integer value of an argument.
bool only_real_values(const std::string &arg_name) const
Tell if only real values are associated to an argument.
A class to manage sets of ordered items.
This is the main namespace.
A class to manage sets of ordered items.