#include <arg_router/help.hpp>
Inherits detail::add_missing_formatter_policy::type.
|
template<bool Flatten> |
using | help_data_type = typename parent_type::template default_leaf_help_data_type< Flatten > |
|
|
template<auto has_formatter = detail::add_missing_formatter_policy<Policies...>::has_formatter> |
constexpr | help_t (Policies... policies, std::enable_if_t< has_formatter > *=nullptr) noexcept |
|
template<bool Flatten, typename Node > |
runtime_help_data | generate_runtime_help_data (const Node &start_node) const noexcept |
|
template<typename... Parents> |
void | parse (parsing::parse_target &&target, const Parents &... parents) const |
|
template<typename... Policies>
class arg_router::help_t< Policies >
Generates the help output.
Create with the help(Policies...) function for consistency with arg_t.
- Template Parameters
-
Policies | Pack of policies that define its behaviour |
Definition at line 49 of file help.hpp.
◆ help_data_type
template<typename... Policies>
template<bool Flatten>
Help data type.
Definition at line 86 of file help.hpp.
◆ help_t()
template<typename... Policies>
template<auto has_formatter = detail::add_missing_formatter_policy<Policies...>::has_formatter>
constexpr arg_router::help_t< Policies >::help_t |
( |
Policies... |
policies, |
|
|
std::enable_if_t< has_formatter > * |
= nullptr |
|
) |
| |
|
inlineexplicitconstexprnoexcept |
Constructor.
- Parameters
-
Definition at line 93 of file help.hpp.
◆ generate_runtime_help_data()
template<typename... Policies>
template<bool Flatten, typename Node >
Starting from start_node, iterate down through the tree generating runtime help data.
- Template Parameters
-
Flatten | True to flatten output |
Node | Start node type |
- Parameters
-
start_node | Tree node to start generating from |
- Returns
- Runtime help data
Definition at line 136 of file help.hpp.
◆ parse()
template<typename... Policies>
template<typename... Parents>
Parse function.
Unless a routing policy is specified, then when parsed the help output is sent to std::cout
and std::exit(EXIT_SUCCESS)
is called. If a routing policy is called the generated help output is passed to it for further processing and the parse call returns.
- Template Parameters
-
Parents | Pack of parent tree nodes in ascending ancestry order |
- Parameters
-
target | Parse target |
parents | Parents instances pack |
- Exceptions
-
parese_exception | Thrown if the requested mode cannot be found |
Definition at line 179 of file help.hpp.
The documentation for this class was generated from the following file: