Scarab  v3.9.1
Project 8 C++ Utility Library
List of all members
FormatterBase Class Referenceabstract

#include <CLI11.hpp>

Inheritance diagram for FormatterBase:
Inheritance graph

Public Member Functions

Basic
 FormatterBase ()=default
 
 FormatterBase (const FormatterBase &)=default
 
 FormatterBase (FormatterBase &&)=default
 
virtual ~FormatterBase () noexcept
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
virtual std::string make_help (const App *, std::string, AppFormatMode) const =0
 This is the key method that puts together help. More...
 
Setters
void label (std::string key, std::string val)
 Set the "REQUIRED" label. More...
 
void column_width (size_t val)
 Set the column width. More...
 
Getters
std::string get_label (std::string key) const
 Get the current value of a name (REQUIRED, etc.) More...
 
size_t get_column_width () const
 Get the current column width. More...
 

Protected Attributes

Options
size_t column_width_ {30}
 The width of the first column. More...
 
std::map< std::string, std::string > labels_
 The required help printout labels (user changeable) Values are Needs, Excludes, etc. More...
 

Detailed Description

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.

Definition at line 2515 of file CLI11.hpp.

Constructor & Destructor Documentation

◆ FormatterBase() [1/3]

FormatterBase ( )
default

◆ FormatterBase() [2/3]

FormatterBase ( const FormatterBase )
default

◆ FormatterBase() [3/3]

FormatterBase ( FormatterBase &&  )
default

◆ ~FormatterBase()

virtual ~FormatterBase ( )
inlinevirtualnoexcept

Adding a destructor in this form to work around bug in GCC 4.7.

Definition at line 2537 of file CLI11.hpp.

Member Function Documentation

◆ column_width()

void column_width ( size_t  val)
inline

Set the column width.

Definition at line 2550 of file CLI11.hpp.

◆ get_column_width()

size_t get_column_width ( ) const
inline

Get the current column width.

Definition at line 2565 of file CLI11.hpp.

◆ get_label()

std::string get_label ( std::string  key) const
inline

Get the current value of a name (REQUIRED, etc.)

Definition at line 2557 of file CLI11.hpp.

◆ label()

void label ( std::string  key,
std::string  val 
)
inline

Set the "REQUIRED" label.

Definition at line 2547 of file CLI11.hpp.

◆ make_help()

virtual std::string make_help ( const App ,
std::string  ,
AppFormatMode   
) const
pure virtual

This is the key method that puts together help.

Implemented in Formatter, and FormatterLambda.

Member Data Documentation

◆ column_width_

size_t column_width_ {30}
protected

The width of the first column.

Definition at line 2521 of file CLI11.hpp.

◆ labels_

std::map<std::string, std::string> labels_
protected

The required help printout labels (user changeable) Values are Needs, Excludes, etc.

Definition at line 2525 of file CLI11.hpp.


The documentation for this class was generated from the following file: