|
constexpr bool | clipp::operator== (tri t, bool b) noexcept |
|
constexpr bool | clipp::operator== (bool b, tri t) noexcept |
|
constexpr bool | clipp::operator!= (tri t, bool b) noexcept |
|
constexpr bool | clipp::operator!= (bool b, tri t) noexcept |
|
template<class Fn , class Ret , class... Args> |
constexpr auto | clipp::traits::check_is_callable (int) -> decltype(std::declval< Fn >()(std::declval< Args >()...), std::integral_constant< bool, std::is_same< Ret, typename std::result_of< Fn(Args...)>::type >::value > |
| function (class) signature type trait More...
|
|
template<class , class , class... > |
constexpr auto | clipp::traits::check_is_callable (long) -> std::false_type |
|
template<class Fn , class Ret > |
constexpr auto | clipp::traits::check_is_callable_without_arg (int) -> decltype(std::declval< Fn >()(), std::integral_constant< bool, std::is_same< Ret, typename std::result_of< Fn()>::type >::value > |
|
template<class , class > |
constexpr auto | clipp::traits::check_is_callable_without_arg (long) -> std::false_type |
|
template<class Fn , class... Args> |
constexpr auto | clipp::traits::check_is_void_callable (int) -> decltype(std::declval< Fn >()(std::declval< Args >()...), std::true_type |
|
template<class , class , class... > |
constexpr auto | clipp::traits::check_is_void_callable (long) -> std::false_type |
|
template<class Fn > |
constexpr auto | clipp::traits::check_is_void_callable_without_arg (int) -> decltype(std::declval< Fn >()(), std::true_type |
|
template<class > |
constexpr auto | clipp::traits::check_is_void_callable_without_arg (long) -> std::false_type |
|
template<class T > |
constexpr auto | clipp::traits::check_is_input_range (int) -> decltype(begin(std::declval< T >()), end(std::declval< T >()), std::true_type |
| input range type trait More...
|
|
template<class T > |
constexpr auto | clipp::traits::check_is_input_range (char) -> decltype(std::begin(std::declval< T >()), std::end(std::declval< T >()), std::true_type |
|
template<class > |
constexpr auto | clipp::traits::check_is_input_range (long) -> std::false_type |
|
template<class T > |
constexpr auto | clipp::traits::check_has_size_getter (int) -> decltype(std::declval< T >().size(), std::true_type |
| size() member type trait More...
|
|
template<class > |
constexpr auto | clipp::traits::check_has_size_getter (long) -> std::false_type |
|
bool | clipp::detail::fwd_to_unsigned_int (const char *&s) |
| forwards string to first non-whitespace char; std string -> unsigned conv yields max value, but we want 0; also checks for nullptr More...
|
|
template<class T , class V > |
T | clipp::detail::clamped_on_limits (const V &v) |
| returns value of v as a T, clamped at T's maximum More...
|
|
template<class T > |
T | clipp::str::make (const arg_string &s) |
| converts string to value of target type 'T' More...
|
|
template<class C , class T , class A > |
void | clipp::str::trimr (std::basic_string< C, T, A > &s) |
| removes trailing whitespace from string More...
|
|
template<class C , class T , class A > |
void | clipp::str::triml (std::basic_string< C, T, A > &s) |
| removes leading whitespace from string More...
|
|
template<class C , class T , class A > |
void | clipp::str::trim (std::basic_string< C, T, A > &s) |
| removes leading and trailing whitespace from string More...
|
|
template<class C , class T , class A > |
void | clipp::str::remove_ws (std::basic_string< C, T, A > &s) |
| removes all whitespaces from string More...
|
|
template<class C , class T , class A > |
bool | clipp::str::has_prefix (const std::basic_string< C, T, A > &subject, const std::basic_string< C, T, A > &prefix) |
| returns true, if the 'prefix' argument is a prefix of the 'subject' argument More...
|
|
template<class C , class T , class A > |
bool | clipp::str::has_postfix (const std::basic_string< C, T, A > &subject, const std::basic_string< C, T, A > &postfix) |
| returns true, if the 'postfix' argument is a postfix of the 'subject' argument More...
|
|
template<class InputRange > |
auto | clipp::str::longest_common_prefix (const InputRange &strs) -> typename std::decay< decltype(*begin(strs))>::type |
| returns longest common prefix of several sequential random access containers More...
|
|
template<class C , class T , class A , class InputRange > |
subrange | clipp::str::longest_substring_match (const std::basic_string< C, T, A > &arg, const InputRange &substrings) |
| returns longest substring range that could be found in 'arg' More...
|
|
template<class C , class T , class A , class InputRange > |
subrange | clipp::str::longest_prefix_match (const std::basic_string< C, T, A > &arg, const InputRange &prefixes) |
| returns longest prefix range that could be found in 'arg' More...
|
|
template<class C , class T , class A > |
subrange | clipp::str::substring_match (const std::basic_string< C, T, A > &subject, const std::basic_string< C, T, A > &query) |
| returns the first occurrence of 'query' within 'subject' More...
|
|
template<class C , class T , class A > |
subrange | clipp::str::first_number_match (std::basic_string< C, T, A > s, C digitSeparator=C(','), C decimalPoint=C('.'), C exponential=C('e')) |
| returns first substring match (pos,len) within the input string that represents a number (with at maximum one decimal point and digit separators) More...
|
|
template<class C , class T , class A > |
subrange | clipp::str::first_integer_match (std::basic_string< C, T, A > s, C digitSeparator=C(',')) |
| returns first substring match (pos,len) that represents an integer (with optional digit separators) More...
|
|
template<class C , class T , class A > |
bool | clipp::str::represents_number (const std::basic_string< C, T, A > &candidate, C digitSeparator=C(','), C decimalPoint=C('.'), C exponential=C('e')) |
| returns true if candidate string represents a number More...
|
|
template<class C , class T , class A > |
bool | clipp::str::represents_integer (const std::basic_string< C, T, A > &candidate, C digitSeparator=C(',')) |
| returns true if candidate string represents an integer More...
|
|
template<class T , class V > |
detail::assign_value< T, V > | clipp::set (T &target, V value) |
| makes function object with a const char* parameter that assigns a value to a ref-captured object More...
|
|
template<class T > |
detail::map_arg_to< T > | clipp::set (T &target) |
| makes parameter-less function object that assigns value(s) to a ref-captured object; value(s) are obtained by converting the const char* argument to the captured object types; bools are always set to true if the argument is not nullptr More...
|
|
detail::assign_value< bool > | clipp::set (bool &target) |
| makes function object that sets a bool to true More...
|
|
detail::assign_value< bool > | clipp::unset (bool &target) |
| makes function object that sets a bool to false More...
|
|
detail::flip_bool | clipp::flip (bool &b) |
| makes function object that flips the value of a ref-captured bool More...
|
|
template<class T > |
detail::increment< T > | clipp::increment (T &target) |
| makes function object that increments using operator ++ More...
|
|
template<class T > |
detail::increment_by< T > | clipp::increment (T &target, T by) |
| makes function object that decrements using operator – More...
|
|
template<class T > |
detail::decrement< T > | clipp::decrement (T &target) |
| makes function object that increments by a fixed amount using operator += More...
|
|
template<class T > |
T & | clipp::detail::operator% (doc_string docstr, token< T > &p) |
| sets documentation strings on a token More...
|
|
template<class T > |
T && | clipp::detail::operator% (doc_string docstr, token< T > &&p) |
|
template<class T > |
T & | clipp::detail::operator% (token< T > &p, doc_string docstr) |
|
template<class T > |
T && | clipp::detail::operator% (token< T > &&p, doc_string docstr) |
|
template<class T > |
T & | clipp::detail::doc (doc_string docstr, token< T > &p) |
| sets documentation strings on a token More...
|
|
template<class T > |
T && | clipp::detail::doc (doc_string docstr, token< T > &&p) |
|
bool | clipp::match::any (const arg_string &) |
| predicate that is always true More...
|
|
bool | clipp::match::none (const arg_string &) |
| predicate that is always false More...
|
|
bool | clipp::match::nonempty (const arg_string &s) |
| predicate that returns true if the argument string is non-empty string More...
|
|
bool | clipp::match::alphanumeric (const arg_string &s) |
| predicate that returns true if the argument is a non-empty string that consists only of alphanumeric characters More...
|
|
bool | clipp::match::alphabetic (const arg_string &s) |
| predicate that returns true if the argument is a non-empty string that consists only of alphabetic characters More...
|
|
length | clipp::match::min_length (std::size_t min) |
| makes function object that returns true if the input string has a given minimum length More...
|
|
length | clipp::match::max_length (std::size_t max) |
| makes function object that returns true if the input string is not longer than a given maximum length More...
|
|
template<class String , class... Strings> |
parameter | clipp::command (String &&flag, Strings &&... flags) |
| makes required non-blocking exact match parameter More...
|
|
template<class String , class... Strings> |
parameter | clipp::required (String &&flag, Strings &&... flags) |
| makes required non-blocking exact match parameter More...
|
|
template<class String , class... Strings> |
parameter | clipp::option (String &&flag, Strings &&... flags) |
| makes optional, non-blocking exact match parameter More...
|
|
template<class... Targets> |
parameter | clipp::value (const doc_string &label, Targets &&... tgts) |
| makes required, blocking, repeatable value parameter; matches any non-empty string More...
|
|
template<class Filter , class... Targets, class = typename std::enable_if< traits::is_callable<Filter,bool(const char*)>::value || traits::is_callable<Filter,subrange(const char*)>::value>::type> |
parameter | clipp::value (Filter &&filter, doc_string label, Targets &&... tgts) |
|
template<class... Targets> |
parameter | clipp::values (const doc_string &label, Targets &&... tgts) |
| makes required, blocking, repeatable value parameter; matches any non-empty string More...
|
|
template<class Filter , class... Targets, class = typename std::enable_if< traits::is_callable<Filter,bool(const char*)>::value || traits::is_callable<Filter,subrange(const char*)>::value>::type> |
parameter | clipp::values (Filter &&filter, doc_string label, Targets &&... tgts) |
|
template<class... Targets> |
parameter | clipp::opt_value (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking value parameter; matches any non-empty string More...
|
|
template<class Filter , class... Targets, class = typename std::enable_if< traits::is_callable<Filter,bool(const char*)>::value || traits::is_callable<Filter,subrange(const char*)>::value>::type> |
parameter | clipp::opt_value (Filter &&filter, doc_string label, Targets &&... tgts) |
|
template<class... Targets> |
parameter | clipp::opt_values (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking, repeatable value parameter; matches any non-empty string More...
|
|
template<class Filter , class... Targets, class = typename std::enable_if< traits::is_callable<Filter,bool(const char*)>::value || traits::is_callable<Filter,subrange(const char*)>::value>::type> |
parameter | clipp::opt_values (Filter &&filter, doc_string label, Targets &&... tgts) |
|
template<class... Targets> |
parameter | clipp::word (const doc_string &label, Targets &&... tgts) |
| makes required, blocking value parameter; matches any string consisting of alphanumeric characters More...
|
|
template<class... Targets> |
parameter | clipp::words (const doc_string &label, Targets &&... tgts) |
| makes required, blocking, repeatable value parameter; matches any string consisting of alphanumeric characters More...
|
|
template<class... Targets> |
parameter | clipp::opt_word (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking value parameter; matches any string consisting of alphanumeric characters More...
|
|
template<class... Targets> |
parameter | clipp::opt_words (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking, repeatable value parameter; matches any string consisting of alphanumeric characters More...
|
|
template<class... Targets> |
parameter | clipp::number (const doc_string &label, Targets &&... tgts) |
| makes required, blocking value parameter; matches any string that represents a number More...
|
|
template<class... Targets> |
parameter | clipp::numbers (const doc_string &label, Targets &&... tgts) |
| makes required, blocking, repeatable value parameter; matches any string that represents a number More...
|
|
template<class... Targets> |
parameter | clipp::opt_number (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking value parameter; matches any string that represents a number More...
|
|
template<class... Targets> |
parameter | clipp::opt_numbers (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking, repeatable value parameter; matches any string that represents a number More...
|
|
template<class... Targets> |
parameter | clipp::integer (const doc_string &label, Targets &&... tgts) |
| makes required, blocking value parameter; matches any string that represents an integer More...
|
|
template<class... Targets> |
parameter | clipp::integers (const doc_string &label, Targets &&... tgts) |
| makes required, blocking, repeatable value parameter; matches any string that represents an integer More...
|
|
template<class... Targets> |
parameter | clipp::opt_integer (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking value parameter; matches any string that represents an integer More...
|
|
template<class... Targets> |
parameter | clipp::opt_integers (const doc_string &label, Targets &&... tgts) |
| makes optional, blocking, repeatable value parameter; matches any string that represents an integer More...
|
|
template<class... Targets> |
parameter | clipp::any_other (Targets &&... tgts) |
| makes catch-all value parameter More...
|
|
group | clipp::operator, (parameter a, parameter b) |
| makes a group of parameters and/or groups More...
|
|
group | clipp::operator, (parameter a, group b) |
|
group | clipp::operator, (group a, parameter b) |
|
group | clipp::operator, (group a, group b) |
|
template<class Param , class... Params> |
group | clipp::one_of (Param param, Params... params) |
| makes a group of alternative parameters or groups More...
|
|
group | clipp::operator| (parameter a, parameter b) |
| makes a group of alternative parameters or groups More...
|
|
group | clipp::operator| (parameter a, group b) |
|
group | clipp::operator| (group a, parameter b) |
|
group | clipp::operator| (group a, group b) |
|
void | clipp::detail::set_blocking (bool) |
|
template<class P , class... Ps> |
void | clipp::detail::set_blocking (bool yes, P &p, Ps &... ps) |
|
template<class Param , class... Params> |
group | clipp::in_sequence (Param param, Params... params) |
| makes a parameter/group sequence by making all input objects blocking More...
|
|
group | clipp::operator& (parameter a, parameter b) |
| makes a parameter/group sequence by making all input objects blocking More...
|
|
group | clipp::operator& (parameter a, group b) |
|
group | clipp::operator& (group a, parameter b) |
|
group | clipp::operator& (group a, group b) |
|
group & | clipp::joinable (group ¶m) |
| makes a group of parameters and/or groups where all single char flag params ("-a", "b", ...) are joinable More...
|
|
group && | clipp::joinable (group &¶m) |
|
template<class... Params> |
group | clipp::joinable (parameter param, Params... params) |
|
template<class P2 , class... Ps> |
group | clipp::joinable (group p1, P2 p2, Ps... ps) |
|
template<class Param , class... Params> |
group | clipp::joinable (doc_string docstr, Param param, Params... params) |
|
parameter | clipp::repeatable (parameter p) |
| makes a repeatable copy of a parameter More...
|
|
group | clipp::repeatable (group g) |
| makes a repeatable copy of a group More...
|
|
template<class P2 , class... Ps> |
group | clipp::repeatable (parameter p1, P2 p2, Ps... ps) |
| makes a group of parameters and/or groups that is repeatable as a whole Note that a repeatable group consisting entirely of non-blocking children is equivalent to a non-repeatable group of repeatable children. More...
|
|
template<class P2 , class... Ps> |
group | clipp::repeatable (group p1, P2 p2, Ps... ps) |
|
parameter && | clipp::with_prefix (const arg_string &prefix, parameter &&p) |
| recursively prepends a prefix to all flags More...
|
|
group & | clipp::with_prefix (const arg_string &prefix, group ¶ms) |
|
group && | clipp::with_prefix (const arg_string &prefix, group &¶ms) |
|
template<class Param , class... Params> |
group | clipp::with_prefix (arg_string prefix, Param &¶m, Params &&... params) |
|
parameter && | clipp::with_prefixes_short_long (const arg_string &shortpfx, const arg_string &longpfx, parameter &&p) |
| recursively prepends a prefix to all flags More...
|
|
group & | clipp::with_prefixes_short_long (const arg_string &shortFlagPrefix, const arg_string &longFlagPrefix, group ¶ms) |
|
group && | clipp::with_prefixes_short_long (const arg_string &shortFlagPrefix, const arg_string &longFlagPrefix, group &¶ms) |
|
template<class Param , class... Params> |
group | clipp::with_prefixes_short_long (const arg_string &shortFlagPrefix, const arg_string &longFlagPrefix, Param &¶m, Params &&... params) |
|
template<class Predicate > |
match_t | clipp::detail::full_match (scoped_dfs_traverser pos, const arg_string &arg, const Predicate &select) |
| finds the first parameter that matches a given string candidate parameters are traversed using a scoped DFS traverser More...
|
|
template<class Predicate > |
match_t | clipp::detail::prefix_match (scoped_dfs_traverser pos, const arg_string &arg, const Predicate &select) |
| finds the first parameter that matches any (non-empty) prefix of a given string; candidate parameters are traversed using a scoped DFS traverser More...
|
|
template<class Predicate > |
match_t | clipp::detail::partial_match (scoped_dfs_traverser pos, const arg_string &arg, const Predicate &select) |
| finds the first parameter that partially matches a given string; candidate parameters are traversed using a scoped DFS traverser More...
|
|
parsing_result | clipp::parse (arg_list args, const group &cli) |
| parses vector of arg strings and executes actions More...
|
|
parsing_result | clipp::parse (std::initializer_list< const char * > arglist, const group &cli) |
| parses initializer_list of C-style arg strings and executes actions More...
|
|
template<class InputIterator > |
parsing_result | clipp::parse (InputIterator first, InputIterator last, const group &cli) |
| parses range of arg strings and executes actions More...
|
|
parsing_result | clipp::parse (const int argc, char *argv[], const group &cli, arg_index offset=1) |
| parses the standard array of command line arguments; omits argv[0] More...
|
|
man_page | clipp::make_man_page (const group ¶ms, doc_string progname="", const doc_formatting &fmt=doc_formatting{}) |
| generates man sections from command line parameters with sections "synopsis" and "options" More...
|
|
template<class OStream > |
OStream & | clipp::operator<< (OStream &os, const man_page &man) |
| generates man page based on command line parameters More...
|
|
doc_string | clipp::debug::doc_label (const parameter &p) |
| prints first flag or value label of a parameter More...
|
|
doc_string | clipp::debug::doc_label (const group &) |
|
doc_string | clipp::debug::doc_label (const pattern &p) |
|
template<class OStream > |
void | clipp::debug::print (OStream &os, const parsing_result &result) |
| prints parsing result More...
|
|
template<class OStream > |
void | clipp::debug::print (OStream &os, const parameter &p) |
| prints parameter label and some properties More...
|
|
template<class OStream > |
void | clipp::debug::print (OStream &os, const group &g, int level) |
| prints group and its contents; uses indentation More...
|
|
template<class OStream > |
void | clipp::debug::print (OStream &os, const pattern ¶m, int level=0) |
| prints group or parameter; uses indentation More...
|
|