#include <cxxopts.hpp>
Public Member Functions | |
void | add_option (const std::string &group, const std::string &s, const std::string &l, std::string desc, std::shared_ptr< const Value > value, std::string arg_help) |
OptionAdder | add_options (std::string group="") |
int | count (const std::string &o) const |
const HelpGroupDetails & | group_help (const std::string &group) const |
const std::vector< std::string > | groups () const |
std::string | help (const std::vector< std::string > &groups={""}) const |
const OptionDetails & | operator[] (const std::string &option) const |
Options (std::string program, std::string help_string="") | |
void | parse (int &argc, char **&argv) |
void | parse_positional (std::string option) |
Private Member Functions | |
void | add_one_option (const std::string &option, std::shared_ptr< OptionDetails > details) |
void | add_to_option (const std::string &option, const std::string &arg) |
void | checked_parse_arg (int argc, char *argv[], int ¤t, std::shared_ptr< OptionDetails > value, const std::string &name) |
bool | consume_positional (std::string a) |
String | help_one_group (const std::string &group) const |
void | parse_option (std::shared_ptr< OptionDetails > value, const std::string &name, const std::string &arg="") |
Private Attributes | |
std::map< std::string, HelpGroupDetails > | m_help |
String | m_help_string |
std::map< std::string, std::shared_ptr< OptionDetails > > | m_options |
std::string | m_positional |
std::string | m_program |
Definition at line 642 of file cxxopts.hpp.
cxxopts::Options::Options | ( | std::string | program, |
std::string | help_string = "" |
||
) | [inline] |
Definition at line 646 of file cxxopts.hpp.
void cxxopts::Options::add_one_option | ( | const std::string & | option, |
std::shared_ptr< OptionDetails > | details | ||
) | [inline, private] |
Definition at line 1191 of file cxxopts.hpp.
void cxxopts::Options::add_option | ( | const std::string & | group, |
const std::string & | s, | ||
const std::string & | l, | ||
std::string | desc, | ||
std::shared_ptr< const Value > | value, | ||
std::string | arg_help | ||
) | [inline] |
Definition at line 1157 of file cxxopts.hpp.
OptionAdder cxxopts::Options::add_options | ( | std::string | group = "" | ) | [inline] |
Definition at line 915 of file cxxopts.hpp.
void cxxopts::Options::add_to_option | ( | const std::string & | option, |
const std::string & | arg | ||
) | [inline, private] |
Definition at line 993 of file cxxopts.hpp.
void cxxopts::Options::checked_parse_arg | ( | int | argc, |
char * | argv[], | ||
int & | current, | ||
std::shared_ptr< OptionDetails > | value, | ||
const std::string & | name | ||
) | [inline, private] |
Definition at line 959 of file cxxopts.hpp.
bool cxxopts::Options::consume_positional | ( | std::string | a | ) | [inline, private] |
Definition at line 1006 of file cxxopts.hpp.
int cxxopts::Options::count | ( | const std::string & | o | ) | const [inline] |
Definition at line 673 of file cxxopts.hpp.
const HelpGroupDetails & cxxopts::Options::group_help | ( | const std::string & | group | ) | const [inline] |
Definition at line 1301 of file cxxopts.hpp.
const std::vector< std::string > cxxopts::Options::groups | ( | ) | const [inline] |
Definition at line 1283 of file cxxopts.hpp.
std::string cxxopts::Options::help | ( | ) | const [inline] |
Definition at line 1265 of file cxxopts.hpp.
String cxxopts::Options::help_one_group | ( | const std::string & | group | ) | const [inline, private] |
Definition at line 1205 of file cxxopts.hpp.
const OptionDetails& cxxopts::Options::operator[] | ( | const std::string & | option | ) | const [inline] |
Definition at line 685 of file cxxopts.hpp.
void cxxopts::Options::parse | ( | int & | argc, |
char **& | argv | ||
) | [inline] |
Definition at line 1026 of file cxxopts.hpp.
void cxxopts::Options::parse_option | ( | std::shared_ptr< OptionDetails > | value, |
const std::string & | name, | ||
const std::string & | arg = "" |
||
) | [inline, private] |
Definition at line 948 of file cxxopts.hpp.
void cxxopts::Options::parse_positional | ( | std::string | option | ) | [inline] |
Definition at line 1020 of file cxxopts.hpp.
std::map<std::string, HelpGroupDetails> cxxopts::Options::m_help [private] |
Definition at line 763 of file cxxopts.hpp.
String cxxopts::Options::m_help_string [private] |
Definition at line 757 of file cxxopts.hpp.
std::map<std::string, std::shared_ptr<OptionDetails> > cxxopts::Options::m_options [private] |
Definition at line 759 of file cxxopts.hpp.
std::string cxxopts::Options::m_positional [private] |
Definition at line 760 of file cxxopts.hpp.
std::string cxxopts::Options::m_program [private] |
Definition at line 756 of file cxxopts.hpp.