| ChainCLI
    A modern C++20 command-line interface library | 
Documentation writer for CLI commands. Consists of formatters for commands and arguments. More...
#include <docwriting.h>
| Public Member Functions | |
| DocWriter (const CliConfig &config) | |
| Construct a new DocWriter object. | |
| void | setAppFormatter (std::unique_ptr< AbstractCliAppDocFormatter > formatter) | 
| Set the formatter for the application documentation. | |
| void | setOptionFormatter (std::unique_ptr< AbstractArgDocFormatter< OptionArgumentBase > > formatter) | 
| Set the formatter for option arguments. | |
| void | setPositionalFormatter (std::unique_ptr< AbstractArgDocFormatter< PositionalArgumentBase > > formatter) | 
| Set the formatter for positional arguments. | |
| void | setFlagFormatter (std::unique_ptr< AbstractArgDocFormatter< FlagArgument > > formatter) | 
| Set the formatter for flag arguments. | |
| void | setCommandFormatter (std::unique_ptr< AbstractCommandFormatter > formatter) | 
| Set the formatter for command arguments. | |
| void | setDocStrings (Command &command, std::string_view fullCommandPath) const | 
| Build and set the documentation strings for a command. | |
| std::string | generateLongDocString (const Command &command, std::string_view fullCommandPath) const | 
| Generate the long documentation string for a command. | |
| std::string | generateShortDocString (const Command &command, std::string_view fullCommandPath) const | 
| Generate the short documentation string for a command. | |
| std::string | generateOptionsDocString (const FlagArgument &argument) const | 
| Generate the documentation string for a flag argument. | |
| std::string | generateArgDocString (const FlagArgument &argument) const | 
| Generate the argument documentation string for a flag argument. | |
| std::string | generateOptionsDocString (const OptionArgumentBase &argument) const | 
| Generate the documentation string for an option argument. | |
| std::string | generateArgDocString (const OptionArgumentBase &argument) const | 
| Generate the argument documentation string for an option argument. | |
| std::string | generateOptionsDocString (const PositionalArgumentBase &argument) const | 
| Generate the documentation string for a positional argument. | |
| std::string | generateArgDocString (const PositionalArgumentBase &argument) const | 
| Generate the argument documentation string for a positional argument. | |
| std::string | generateAppDocString (const std::vector< const cli::commands::Command * > &commands) const | 
| Generate the documentation string for the application. | |
| std::string | generateCommandDocString (const Command &command) const | 
| Generate the documentation string for a command. | |
| std::string | generateAppVersionString () const | 
| Generate the version string for the application. | |
Documentation writer for CLI commands. Consists of formatters for commands and arguments.
| 
 | inlineexplicit | 
Construct a new DocWriter object.
| config | The CLI configuration. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateAppDocString | ( | const std::vector< const cli::commands::Command * > & | commands | ) | const | 
Generate the documentation string for the application.
| commands | The commands to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateAppVersionString | ( | ) | const | 
Generate the version string for the application.
| inline_t std::string cli::commands::docwriting::DocWriter::generateArgDocString | ( | const FlagArgument & | argument | ) | const | 
Generate the argument documentation string for a flag argument.
| argument | The flag argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateArgDocString | ( | const OptionArgumentBase & | argument | ) | const | 
Generate the argument documentation string for an option argument.
| argument | The option argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateArgDocString | ( | const PositionalArgumentBase & | argument | ) | const | 
Generate the argument documentation string for a positional argument.
| argument | The positional argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateCommandDocString | ( | const Command & | command | ) | const | 
Generate the documentation string for a command.
| command | The command to generate the documentation string for. | 
| fullCommandPath | The full path of the command. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateLongDocString | ( | const Command & | command, | 
| std::string_view | fullCommandPath | ||
| ) | const | 
Generate the long documentation string for a command.
| command | The command to generate the documentation string for. | 
| fullCommandPath | The full path of the command. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateOptionsDocString | ( | const FlagArgument & | argument | ) | const | 
Generate the documentation string for a flag argument.
| argument | The flag argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateOptionsDocString | ( | const OptionArgumentBase & | argument | ) | const | 
Generate the documentation string for an option argument.
| argument | The option argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateOptionsDocString | ( | const PositionalArgumentBase & | argument | ) | const | 
Generate the documentation string for a positional argument.
| argument | The positional argument to generate the documentation string for. | 
| inline_t std::string cli::commands::docwriting::DocWriter::generateShortDocString | ( | const Command & | command, | 
| std::string_view | fullCommandPath | ||
| ) | const | 
Generate the short documentation string for a command.
| command | The command to generate the documentation string for. | 
| fullCommandPath | The full path of the command. | 
| inline_t void cli::commands::docwriting::DocWriter::setAppFormatter | ( | std::unique_ptr< AbstractCliAppDocFormatter > | formatter | ) | 
Set the formatter for the application documentation.
| formatter | The formatter to use for the application documentation. | 
| inline_t void cli::commands::docwriting::DocWriter::setCommandFormatter | ( | std::unique_ptr< AbstractCommandFormatter > | formatter | ) | 
Set the formatter for command arguments.
| formatter | The formatter to use for command arguments. | 
| inline_t void cli::commands::docwriting::DocWriter::setDocStrings | ( | Command & | command, | 
| std::string_view | fullCommandPath | ||
| ) | const | 
Build and set the documentation strings for a command.
| command | The command to set the documentation strings for. | 
| fullCommandPath | The full path of the command. | 
| inline_t void cli::commands::docwriting::DocWriter::setFlagFormatter | ( | std::unique_ptr< AbstractArgDocFormatter< FlagArgument > > | formatter | ) | 
Set the formatter for flag arguments.
| formatter | The formatter to use for flag arguments. | 
| inline_t void cli::commands::docwriting::DocWriter::setOptionFormatter | ( | std::unique_ptr< AbstractArgDocFormatter< OptionArgumentBase > > | formatter | ) | 
Set the formatter for option arguments.
| formatter | The formatter to use for option arguments. | 
| inline_t void cli::commands::docwriting::DocWriter::setPositionalFormatter | ( | std::unique_ptr< AbstractArgDocFormatter< PositionalArgumentBase > > | formatter | ) | 
Set the formatter for positional arguments.
| formatter | The formatter to use for positional arguments. |