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;
109 (ratio >= 0.0f) ? ((ratio <= 1.0f) ? ratio : 1.0f / ratio) : ((ratio < -1.0f) ? 1.0f / (-ratio) : -ratio);
136 CLI11_NODISCARD std::string
get_label(std::string key)
const {
177 using funct_t = std::function<std::string(
const App *, std::string, AppFormatMode)>;
190 std::string
make_help(
const App *app, std::string name, AppFormatMode mode)
const override {
191 return lambda_(app, name, mode);
197class Formatter :
public FormatterBase {
199 Formatter() =
default;
200 Formatter(
const Formatter &) =
default;
201 Formatter(Formatter &&) =
default;
202 Formatter &operator=(
const Formatter &) =
default;
203 Formatter &operator=(Formatter &&) =
default;
210 CLI11_NODISCARD
virtual std::string
211 make_group(std::string group,
bool is_positional, std::vector<const Option *> opts)
const;
217 std::string
make_groups(
const App *app, AppFormatMode mode)
const;
226 virtual std::string
make_expanded(
const App *sub, AppFormatMode mode)
const;
235 virtual std::string
make_usage(
const App *app, std::string name)
const;
238 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:259