clipp::detail Namespace Reference

helpers (NOT FOR DIRECT USE IN CLIENT CODE!) no interface guarantees; might be changed or removed in the future More...

Classes

class  action_provider
 mixin that provides action definition and execution More...
 
class  assign_value
 assigns boolean constant to one or multiple target objects More...
 
class  decrement
 decrements using operator – More...
 
class  flip_bool
 flips bools More...
 
class  increment
 increments using operator ++ More...
 
class  increment_by
 increments by a fixed amount using operator += More...
 
struct  limits_clamped
 value limits clamping More...
 
struct  limits_clamped< T, V, false >
 
struct  make
 type conversion helpers More...
 
struct  make< bool >
 
struct  make< char >
 
struct  make< double >
 
struct  make< float >
 
struct  make< int >
 
struct  make< long double >
 
struct  make< long int >
 
struct  make< long long int >
 
struct  make< short int >
 
struct  make< std::string >
 
struct  make< unsigned char >
 
struct  make< unsigned int >
 
struct  make< unsigned long int >
 
struct  make< unsigned long long int >
 
struct  make< unsigned short int >
 
class  map_arg_to
 makes a value from a string and assigns it to an object More...
 
class  map_arg_to< bool >
 specialization for bools: set to true regardless of string content More...
 
class  map_arg_to< std::vector< T > >
 specialization for vectors: append element More...
 
class  match_t
 result of a matching operation More...
 
class  scoped_dfs_traverser
 DFS traverser that keeps track of 'scopes' scope = all parameters that are either bounded by two blocking parameters on the same depth level or the beginning/end of the outermost group. More...
 
struct  select_all
 
struct  select_flags
 
struct  select_values
 
class  token
 mixin that provides basic common settings of parameters and groups More...
 

Functions

bool 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 >
clamped_on_limits (const V &v)
 returns value of v as a T, clamped at T's maximum More...
 
template<class T >
T & operator% (doc_string docstr, token< T > &p)
 sets documentation strings on a token More...
 
template<class T >
T && operator% (doc_string docstr, token< T > &&p)
 
template<class T >
T & operator% (token< T > &p, doc_string docstr)
 
template<class T >
T && operator% (token< T > &&p, doc_string docstr)
 
template<class T >
T & doc (doc_string docstr, token< T > &p)
 sets documentation strings on a token More...
 
template<class T >
T && doc (doc_string docstr, token< T > &&p)
 
void set_blocking (bool)
 
template<class P , class... Ps>
void set_blocking (bool yes, P &p, Ps &... ps)
 
template<class Predicate >
match_t 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 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 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...
 

Detailed Description

helpers (NOT FOR DIRECT USE IN CLIENT CODE!) no interface guarantees; might be changed or removed in the future

parsing implementation details

helpers (NOT FOR DIRECT USE IN CLIENT CODE!)

Function Documentation

◆ clamped_on_limits()

template<class T , class V >
T clipp::detail::clamped_on_limits ( const V &  v)
inline

returns value of v as a T, clamped at T's maximum

Definition at line 327 of file clipp.h.

◆ doc() [1/2]

template<class T >
T&& clipp::detail::doc ( doc_string  docstr,
token< T > &&  p 
)
inline

Definition at line 1546 of file clipp.h.

◆ doc() [2/2]

template<class T >
T& clipp::detail::doc ( doc_string  docstr,
token< T > &  p 
)
inline

sets documentation strings on a token

Definition at line 1539 of file clipp.h.

◆ full_match()

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

Definition at line 4076 of file clipp.h.

◆ fwd_to_unsigned_int()

bool clipp::detail::fwd_to_unsigned_int ( const char *&  s)
inline

forwards string to first non-whitespace char; std string -> unsigned conv yields max value, but we want 0; also checks for nullptr

Definition at line 287 of file clipp.h.

◆ operator%() [1/4]

template<class T >
T&& clipp::detail::operator% ( doc_string  docstr,
token< T > &&  p 
)
inline

Definition at line 1509 of file clipp.h.

◆ operator%() [2/4]

template<class T >
T& clipp::detail::operator% ( doc_string  docstr,
token< T > &  p 
)
inline

sets documentation strings on a token

Definition at line 1502 of file clipp.h.

◆ operator%() [3/4]

template<class T >
T&& clipp::detail::operator% ( token< T > &&  p,
doc_string  docstr 
)
inline

Definition at line 1524 of file clipp.h.

◆ operator%() [4/4]

template<class T >
T& clipp::detail::operator% ( token< T > &  p,
doc_string  docstr 
)
inline

Definition at line 1517 of file clipp.h.

◆ partial_match()

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

Definition at line 4143 of file clipp.h.

◆ prefix_match()

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

Definition at line 4107 of file clipp.h.

◆ set_blocking() [1/2]

template<class P , class... Ps>
void clipp::detail::set_blocking ( bool  yes,
P &  p,
Ps &...  ps 
)

Definition at line 3469 of file clipp.h.

◆ set_blocking() [2/2]

void clipp::detail::set_blocking ( bool  )
inline

Definition at line 3466 of file clipp.h.