arg_router
1.4.0
C++ command line argument parsing and routing
|
#include <arg_router/policy/token_end_marker.hpp>
Public Types | |
using | string_type = S |
Public Member Functions | |
constexpr | token_end_marker_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 | token_end_marker () noexcept |
Static Public Attributes | |
constexpr static auto | priority = std::size_t{760} |
Represents the token in a variable length value list that marks the end of the list at runtime.
Typically a variable length value list (e.g. the value tokens for a positional_arg_t) sits at the end of the input tokens as the corresponding node will consume the tokens until the maximum count or token list end is reached. This policy can adjust that behaviour by defining a token that marks the end of list. This allows multiple variable length value list nodes to be used under a single mode.
If using C++17 then use the template variable helper with the S_
macro; for C++20 and higher, use the constructor directly with a compile-time string literal:
S | Compile-time string |
Definition at line 30 of file token_end_marker.hpp.
using arg_router::policy::token_end_marker_t< S >::string_type = S |
String type.
Definition at line 34 of file token_end_marker.hpp.
|
inlineexplicitconstexprnoexcept |
|
inline |
Checks that the owner expects a variable length list of token values. This policy does not perform any operation on the input tokens.
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 target |
parents | Parent node instances |
Definition at line 64 of file token_end_marker.hpp.
|
inlinestaticconstexprnoexcept |
Returns the token end marker.
Definition at line 49 of file token_end_marker.hpp.
|
staticconstexpr |
Policy priority.
Definition at line 37 of file token_end_marker.hpp.