#include <FormatterFwd.hpp>
Public Member Functions | |
Basic | |
| FormatterBase ()=default | |
| FormatterBase (const FormatterBase &)=default | |
| FormatterBase (FormatterBase &&)=default | |
| FormatterBase & | operator= (const FormatterBase &)=default |
| FormatterBase & | operator= (FormatterBase &&)=default |
| virtual | ~FormatterBase () noexcept |
| Adding a destructor in this form to work around bug in GCC 4.7. | |
| virtual std::string | make_help (const App *, std::string, AppFormatMode) const =0 |
| This is the key method that puts together help. | |
Setters | |
| void | label (std::string key, std::string val) |
| Set the "REQUIRED" or other labels. | |
| void | column_width (std::size_t val) |
| Set the left column width (options/flags/subcommands) | |
| void | long_option_alignment_ratio (float ratio) |
| void | right_column_width (std::size_t val) |
| Set the right column width (description of options/flags/subcommands) | |
| void | description_paragraph_width (std::size_t val) |
| Set the description paragraph width at the top of help. | |
| void | footer_paragraph_width (std::size_t val) |
| Set the footer paragraph width. | |
| void | enable_description_formatting (bool value=true) |
| enable formatting for description paragraph | |
| void | enable_footer_formatting (bool value=true) |
| disable formatting for footer paragraph | |
Getters | |
| CLI11_NODISCARD std::string | get_label (std::string key) const |
| Get the current value of a name (REQUIRED, etc.) | |
| CLI11_NODISCARD std::size_t | get_column_width () const |
| Get the current left column width (options/flags/subcommands) | |
| CLI11_NODISCARD std::size_t | get_right_column_width () const |
| Get the current right column width (description of options/flags/subcommands) | |
| CLI11_NODISCARD std::size_t | get_description_paragraph_width () const |
| Get the current description paragraph width at the top of help. | |
| CLI11_NODISCARD std::size_t | get_footer_paragraph_width () const |
| Get the current footer paragraph width. | |
| CLI11_NODISCARD bool | is_description_paragraph_formatting_enabled () const |
| Get the current status of description paragraph formatting. | |
| CLI11_NODISCARD bool | is_footer_paragraph_formatting_enabled () const |
| Get the current status of whether footer paragraph formatting is enabled. | |
Protected Attributes | |
Options | |
| 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 (description of options/flags/subcommands) | |
| std::size_t | description_paragraph_width_ {80} |
| The width of the description paragraph at the top of help. | |
| std::size_t | footer_paragraph_width_ {80} |
| The width of the footer paragraph. | |
| bool | enable_description_formatting_ {true} |
| options controlling formatting for footer and descriptions | |
| bool | enable_footer_formatting_ {true} |
| std::map< std::string, std::string > | labels_ {} |
| The required help printout labels (user changeable) Values are Needs, Excludes, etc. | |
This is the minimum requirements to run a formatter.
A user can subclass this is if they do not care at all about the structure in CLI::Formatter.
|
default |
|
default |
|
default |
|
inlinevirtualnoexcept |
Adding a destructor in this form to work around bug in GCC 4.7.
|
inline |
Set the left column width (options/flags/subcommands)
|
inline |
Set the description paragraph width at the top of help.
|
inline |
enable formatting for description paragraph
|
inline |
disable formatting for footer paragraph
|
inline |
Set the footer paragraph width.
|
inline |
Get the current left column width (options/flags/subcommands)
|
inline |
Get the current description paragraph width at the top of help.
|
inline |
Get the current footer paragraph width.
|
inline |
Get the current value of a name (REQUIRED, etc.)
|
inline |
Get the current right column width (description of options/flags/subcommands)
|
inline |
Get the current status of description paragraph formatting.
|
inline |
Get the current status of whether footer paragraph formatting is enabled.
|
inline |
Set the "REQUIRED" or other labels.
|
inline |
Set the alignment ratio for long options within the left column The ratio is in [0;1] range (e.g. 0.2 = 20% of column width, 6.f/column_width = 6th character)
|
pure virtual |
This is the key method that puts together help.
Implemented in CLI::Formatter, and CLI::FormatterLambda.
|
default |
|
default |
|
inline |
Set the right column width (description of options/flags/subcommands)
|
protected |
The width of the left column (options/flags/subcommands)
|
protected |
The width of the description paragraph at the top of help.
|
protected |
options controlling formatting for footer and descriptions
|
protected |
|
protected |
The width of the footer paragraph.
|
protected |
The required help printout labels (user changeable) Values are Needs, Excludes, etc.
|
protected |
The alignment ratio for long options within the left column.
|
protected |
The width of the right column (description of options/flags/subcommands)