20#include "StringTools.hpp"
33enum class AppFormatMode : std::uint8_t {
65 bool enable_footer_formatting_{
true};
69 bool enable_option_type_names_{
true};
70 bool enable_default_flag_values_{
true};
73 std::map<std::string, std::string>
labels_{};
76 static std::string
default_label(
const std::string &key) {
return key; }
93 virtual std::string
make_help(
const App *, std::string, AppFormatMode)
const = 0;
133 CLI11_NODISCARD std::string
get_label(std::string key)
const;
171 using funct_t = std::function<std::string(
const App *, std::string, AppFormatMode)>;
184 std::string
make_help(
const App *app, std::string name, AppFormatMode mode)
const override;
189class Formatter :
public FormatterBase {
191 Formatter() =
default;
192 Formatter(
const Formatter &) =
default;
193 Formatter(Formatter &&) =
default;
194 Formatter &operator=(
const Formatter &) =
default;
195 Formatter &operator=(Formatter &&) =
default;
202 CLI11_NODISCARD
virtual std::string
203 make_group(std::string group,
bool is_positional, std::vector<const Option *> opts)
const;
209 std::string
make_groups(
const App *app, AppFormatMode mode)
const;
218 virtual std::string
make_expanded(
const App *sub, AppFormatMode mode)
const;
227 virtual std::string
make_usage(
const App *app, std::string name)
const;
230 std::string
make_help(
const App *app, std::string, AppFormatMode mode)
const override;
Creates a command line program, with very few defaults.
Definition App.hpp:115
Definition Option.hpp:261