cli11
Loading...
Searching...
No Matches
formatter_fwd.cpp File Reference
module cli11

Declarations for the help formatters. More...

import cli11:string_tools;
import std;

Classes

class  cli::formatter_base_t
 Layout settings and labels shared by every formatter. More...
class  cli::formatter_lambda_t
 A formatter that delegates the whole help page to a callable. More...
class  cli::formatter_t
 The default help formatter. More...

Enumerations

enum class  cli::app_format_mode_t : std::uint8_t { normal , all , sub }
 How much detail a help request wants. More...

Detailed Description

Declarations for the help formatters.

cli::formatter_base_t holds the layout settings and the labels; cli::formatter_t declares the overridable pieces that assemble a help page. The bodies live in the formatter partition, which is separate so that app_t can hold a formatter without a circular dependency.

To customise help output, derive from cli::formatter_t and override the pieces you care about, or wrap a lambda in cli::formatter_lambda_t.

Enumeration Type Documentation

◆ app_format_mode_t

enum class cli::app_format_mode_t : std::uint8_t
exportstrong

How much detail a help request wants.

Enumerator
normal 

The normal, detailed help.

all 

A fully expanded help.

sub 

Used when printed as part of an expanded subcommand.