Scarab  v3.5.0
Project 8 C++ Utility Library
Public Member Functions | Private Types | Private Attributes | List of all members
FormatterLambda Class Referencefinal

This is a specialty override for lambda functions. More...

#include <CLI11.hpp>

Inheritance diagram for FormatterLambda:
Inheritance graph

Public Member Functions

 FormatterLambda (funct_t funct)
 Create a FormatterLambda with a lambda function. More...
 
 ~FormatterLambda () noexcept override
 Adding a destructor (mostly to make GCC 4.7 happy) More...
 
std::string make_help (const App *app, std::string name, AppFormatMode mode) const override
 This will simply call the lambda function. More...
 
- Public Member Functions inherited from FormatterBase
 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...
 
void label (std::string key, std::string val)
 Set the "REQUIRED" label. More...
 
void column_width (size_t val)
 Set the column width. More...
 
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...
 

Private Types

using funct_t = std::function< std::string(const App *, std::string, AppFormatMode)>
 

Private Attributes

funct_t lambda_
 The lambda to hold and run. More...
 

Additional Inherited Members

- Protected Attributes inherited from FormatterBase
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 a specialty override for lambda functions.

Definition at line 2571 of file CLI11.hpp.

Member Typedef Documentation

◆ funct_t

using funct_t = std::function<std::string(const App *, std::string, AppFormatMode)>
private

Definition at line 2572 of file CLI11.hpp.

Constructor & Destructor Documentation

◆ FormatterLambda()

FormatterLambda ( funct_t  funct)
inlineexplicit

Create a FormatterLambda with a lambda function.

Definition at line 2579 of file CLI11.hpp.

◆ ~FormatterLambda()

~FormatterLambda ( )
inlineoverridenoexcept

Adding a destructor (mostly to make GCC 4.7 happy)

Definition at line 2582 of file CLI11.hpp.

Member Function Documentation

◆ make_help()

std::string make_help ( const App app,
std::string  name,
AppFormatMode  mode 
) const
inlineoverridevirtual

This will simply call the lambda function.

Implements FormatterBase.

Definition at line 2585 of file CLI11.hpp.

Member Data Documentation

◆ lambda_

funct_t lambda_
private

The lambda to hold and run.

Definition at line 2575 of file CLI11.hpp.


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