|
|
| formatter_t (const formatter_t &)=default |
|
| formatter_t (formatter_t &&)=default |
|
auto | operator= (const formatter_t &) -> formatter_t &=default |
|
auto | operator= (formatter_t &&) -> formatter_t &=default |
| virtual auto | make_group (std::string group, bool is_positional, std::vector< const option_t * > opts) const -> std::string |
| | Renders one named group of options.
|
| virtual auto | make_positionals (const app_t *app) const -> std::string |
| | Renders the positional arguments section.
|
| auto | make_groups (const app_t *app, app_format_mode_t mode) const -> std::string |
| | Renders every option group.
|
| virtual auto | make_subcommands (const app_t *app, app_format_mode_t mode) const -> std::string |
| | Renders the subcommand list.
|
| virtual auto | make_subcommand (const app_t *sub) const -> std::string |
| | Renders a single subcommand entry.
|
| virtual auto | make_expanded (const app_t *sub, app_format_mode_t mode) const -> std::string |
| | Renders a subcommand expanded in full.
|
| virtual auto | make_footer (const app_t *app) const -> std::string |
| | Renders the footer.
|
| virtual auto | make_description (const app_t *app) const -> std::string |
| | Renders the description paragraph.
|
| virtual auto | make_usage (const app_t *app, std::string name) const -> std::string |
| | Renders the usage line.
|
| auto | make_help (const app_t *app, std::string name, app_format_mode_t mode) const -> std::string override |
| | Assembles the complete help page.
|
| virtual auto | make_option (const option_t *opt, bool is_positional) const -> std::string |
| | Renders a single option entry.
|
| virtual auto | make_option_name (const option_t *opt, bool is_positional) const -> std::string |
| | Renders the name column of an option entry.
|
| virtual auto | make_option_opts (const option_t *opt) const -> std::string |
| | Renders the qualifiers that follow an option's name.
|
| virtual auto | make_option_desc (const option_t *opt) const -> std::string |
| | Renders an option's description column.
|
| virtual auto | make_option_usage (const option_t *opt) const -> std::string |
| | Renders how an option appears in the usage line.
|
|
| formatter_base_t (const formatter_base_t &)=default |
|
| formatter_base_t (formatter_base_t &&)=default |
|
auto | operator= (const formatter_base_t &) -> formatter_base_t &=default |
|
auto | operator= (formatter_base_t &&) -> formatter_base_t &=default |
| auto | label (std::string key, std::string val) -> void |
| | Overrides a section label.
|
| auto | column_width (std::size_t val) -> void |
| | Sets the width of the left column.
|
| auto | long_option_alignment_ratio (float ratio) -> void |
| | Sets the alignment ratio for long options in the left column.
|
| auto | right_column_width (std::size_t val) -> void |
| | Sets the width of the right column.
|
| auto | description_paragraph_width (std::size_t val) -> void |
| | Sets the width of the description paragraph.
|
| auto | footer_paragraph_width (std::size_t val) -> void |
| | Sets the width of the footer paragraph.
|
| auto | enable_description_formatting (bool value=true) -> void |
| | Enables or disables reflowing of the description paragraph.
|
| auto | enable_footer_formatting (bool value=true) -> void |
| | Enables or disables reflowing of the footer paragraph.
|
| auto | enable_option_defaults (bool value=true) -> void |
| | Enables or disables printing of option default values.
|
| auto | enable_option_type_names (bool value=true) -> void |
| | Enables or disables printing of option type names.
|
| auto | enable_default_flag_values (bool value=true) -> void |
| | Enables or disables printing of default flag values.
|
| auto | get_label (std::string_view key) const -> std::string |
| | Resolves a section label, applying any override.
|
| auto | get_column_width () const -> std::size_t |
| | Returns the width of the left column.
|
| auto | get_right_column_width () const -> std::size_t |
| | Returns the width of the right column.
|
| auto | get_description_paragraph_width () const -> std::size_t |
| | Returns the width of the description paragraph.
|
| auto | get_footer_paragraph_width () const -> std::size_t |
| | Returns the width of the footer paragraph.
|
| auto | get_long_option_alignment_ratio () const -> float |
| | Returns the alignment ratio for long options.
|
| auto | is_description_paragraph_formatting_enabled () const -> bool |
| | Reports whether the description paragraph is reflowed.
|
| auto | is_footer_paragraph_formatting_enabled () const -> bool |
| | Reports whether the footer paragraph is reflowed.
|
| auto | is_option_defaults_enabled () const -> bool |
| | Reports whether option default values are printed.
|
| auto | is_option_type_names_enabled () const -> bool |
| | Reports whether option type names are printed.
|
| auto | is_default_flag_values_enabled () const -> bool |
| | Reports whether default flag values are printed.
|
|
| static auto | default_label (std::string_view key) -> std::string |
| | The label used when no override is set.
|
|
std::size_t | column_width_ {30} |
| | The width of the left column (options, flags, subcommands).
|
|
float | long_option_alignment_ratio_ {1 / 3.f} |
| | The alignment ratio for long options within the left column.
|
|
std::size_t | right_column_width_ {65} |
| | The width of the right column (descriptions).
|
|
std::size_t | description_paragraph_width_ {80} |
| | The width of the description paragraph at the top of the help.
|
|
std::size_t | footer_paragraph_width_ {80} |
| | The width of the footer paragraph.
|
|
bool | enable_description_formatting_ {true} |
| | Whether the description paragraph is reflowed.
|
|
bool | enable_footer_formatting_ {true} |
| | Whether the footer paragraph is reflowed.
|
|
bool | enable_option_defaults_ {true} |
| | Whether option default values are printed.
|
|
bool | enable_option_type_names_ {true} |
| | Whether option type names are printed.
|
|
bool | enable_default_flag_values_ {true} |
| | Whether default flag values are printed.
|
| std::map< std::string, std::string, std::less<> > | labels_ {} |
| | User overrides for the section labels.
|
The default help formatter.
Each piece of the help page is a separate virtual, so a derived formatter can replace one section without reimplementing the rest.