Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
CLI::FormatterLambda Class Referencefinal

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

#include <CLI11.hpp>

Inheritance diagram for CLI::FormatterLambda:
Collaboration diagram for CLI::FormatterLambda:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from CLI::FormatterBase
std::size_t column_width_ {30}
 The width of the first column.
 
std::map< std::string, std::string > labels_ {}
 The required help printout labels (user changeable) Values are Needs, Excludes, etc.
 

Detailed Description

Definition at line 3233 of file CLI11.hpp.

Constructor & Destructor Documentation

◆ FormatterLambda()

CLI::FormatterLambda::FormatterLambda ( funct_t funct)
inlineexplicit

Definition at line 3241 of file CLI11.hpp.

3241: lambda_(std::move(funct)) {}

◆ ~FormatterLambda()

CLI::FormatterLambda::~FormatterLambda ( )
inlineoverridenoexcept

Definition at line 3244 of file CLI11.hpp.

3244{} // NOLINT(modernize-use-equals-default)

Member Function Documentation

◆ make_help()

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

Implements CLI::FormatterBase.

Definition at line 3247 of file CLI11.hpp.

3247 {
3248 return lambda_(app, name, mode);
3249 }
std::string name

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