#include <cmdline.h>
|
| parser ()=default |
|
| ~parser () |
|
void | add (const std::string &name, char short_name=0, const std::string &desc="") |
|
template<class T > |
void | add (const std::string &name, char short_name=0, const std::string &desc="", bool need=true, const T def=T()) |
|
template<class T , class F > |
void | add (const std::string &name, char short_name=0, const std::string &desc="", bool need=true, const T def=T(), F reader=F()) |
|
void | footer (const std::string &f) |
|
void | set_program_name (const std::string &name) |
|
bool | exist (const std::string &name) const |
|
template<class T > |
const T & | get (const std::string &name) const |
|
const std::vector< std::string > & | rest () const |
|
bool | parse (const std::string &arg) |
|
bool | parse (const std::vector< std::string > &args) |
|
bool | parse (int argc, const char *const argv[]) |
|
void | parse_check (const std::string &arg) |
|
void | parse_check (const std::vector< std::string > &args) |
|
void | parse_check (int argc, char *argv[]) |
|
std::string | error () const |
|
std::string | error_full () const |
|
std::string | usage () const |
|
Definition at line 376 of file cmdline.h.
◆ parser()
cmdline::parser::parser |
( |
| ) |
|
|
default |
◆ ~parser()
cmdline::parser::~parser |
( |
| ) |
|
|
inline |
◆ add() [1/3]
void cmdline::parser::add |
( |
const std::string & |
name, |
|
|
char |
short_name = 0 , |
|
|
const std::string & |
desc = "" |
|
) |
| |
|
inline |
◆ add() [2/3]
template<class T >
void cmdline::parser::add |
( |
const std::string & |
name, |
|
|
char |
short_name = 0 , |
|
|
const std::string & |
desc = "" , |
|
|
bool |
need = true , |
|
|
const T |
def = T() |
|
) |
| |
|
inline |
◆ add() [3/3]
template<class T , class F >
void cmdline::parser::add |
( |
const std::string & |
name, |
|
|
char |
short_name = 0 , |
|
|
const std::string & |
desc = "" , |
|
|
bool |
need = true , |
|
|
const T |
def = T() , |
|
|
F |
reader = F() |
|
) |
| |
|
inline |
◆ footer()
void cmdline::parser::footer |
( |
const std::string & |
f | ) |
|
|
inline |
◆ set_program_name()
void cmdline::parser::set_program_name |
( |
const std::string & |
name | ) |
|
|
inline |
◆ exist()
bool cmdline::parser::exist |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ get()
template<class T >
const T& cmdline::parser::get |
( |
const std::string & |
name | ) |
const |
|
inline |
◆ rest()
const std::vector<std::string>& cmdline::parser::rest |
( |
| ) |
const |
|
inline |
◆ parse() [1/3]
bool cmdline::parser::parse |
( |
const std::string & |
arg | ) |
|
|
inline |
◆ parse() [2/3]
bool cmdline::parser::parse |
( |
const std::vector< std::string > & |
args | ) |
|
|
inline |
◆ parse() [3/3]
bool cmdline::parser::parse |
( |
int |
argc, |
|
|
const char *const |
argv[] |
|
) |
| |
|
inline |
◆ parse_check() [1/3]
void cmdline::parser::parse_check |
( |
const std::string & |
arg | ) |
|
|
inline |
◆ parse_check() [2/3]
void cmdline::parser::parse_check |
( |
const std::vector< std::string > & |
args | ) |
|
|
inline |
◆ parse_check() [3/3]
void cmdline::parser::parse_check |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inline |
◆ error()
std::string cmdline::parser::error |
( |
| ) |
const |
|
inline |
◆ error_full()
std::string cmdline::parser::error_full |
( |
| ) |
const |
|
inline |
◆ usage()
std::string cmdline::parser::usage |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: