arg_router
1.4.0
C++ command line argument parsing and routing
|
#include <arg_router/policy/value_separator.hpp>
Public Types | |
using | string_type = S |
Public Member Functions | |
constexpr | value_separator_t ([[maybe_unused]] S str={}) noexcept |
template<typename ProcessedTarget , typename... Parents> | |
parsing::pre_parse_result | pre_parse_phase (parsing::dynamic_token_adapter &tokens, [[maybe_unused]] utility::compile_time_optional< ProcessedTarget > processed_target, [[maybe_unused]] parsing::parse_target &target, [[maybe_unused]] const Parents &... parents) const |
Static Public Member Functions | |
constexpr static std::string_view | value_separator () noexcept |
Static Public Attributes | |
constexpr static auto | priority = std::size_t{1000} |
Represents the character that separates a label token from its value token(s).
Your terminal will separate tokens using whitespace by default, but often a different character is used e.g. –arg=42
- this policy specifies that character.
If using C++17 then use the template variable helper with the S_
macro or char; for C++20 and higher, use the char variable helper or the constructor directly with a compile-time string literal:
S | Compile-time string |
Definition at line 31 of file value_separator.hpp.
using arg_router::policy::value_separator_t< S >::string_type = S |
String type.
Definition at line 40 of file value_separator.hpp.
|
inlineexplicitconstexprnoexcept |
|
inline |
Splits the label token from the value using the separator.
ProcessedTarget | processed_target payload type |
Parents | Pack of parent tree nodes in ascending ancestry order |
tokens | Currently processed tokens |
processed_target | Previously processed parse_target of parent node, or empty is there is no non-root parent |
target | Pre-parse generated targets |
parents | Parent node instances |
Definition at line 70 of file value_separator.hpp.
|
inlinestaticconstexprnoexcept |
Returns the separator.
Definition at line 55 of file value_separator.hpp.
|
staticconstexpr |
Policy priority.
Definition at line 43 of file value_separator.hpp.