PIDUINO
Loading...
Searching...
No Matches
Piduino::BashCompletionOptionPrinter

Option printer for bash completion. More...

#include <popl.h>

Inheritance diagram for Piduino::BashCompletionOptionPrinter:
Collaboration diagram for Piduino::BashCompletionOptionPrinter:

Public Member Functions

 BashCompletionOptionPrinter (const OptionParser *option_parser, std::string program_name)
 BashCompletionOptionPrinter implementation /////////////////////////////////.
 
 ~BashCompletionOptionPrinter () override=default
 
std::string print (const Attribute &max_attribute=Attribute::optional) const override
 

Protected Attributes

const OptionParseroption_parser_
 

Private Attributes

std::string program_name_
 

Detailed Description

Option printer for bash completion.

Creates a script with all options (short and long) that can be used for bash completion

Definition at line 477 of file popl.h.

Constructor & Destructor Documentation

◆ BashCompletionOptionPrinter()

Piduino::BashCompletionOptionPrinter::BashCompletionOptionPrinter ( const OptionParser option_parser,
std::string  program_name 
)
inline

BashCompletionOptionPrinter implementation /////////////////////////////////.

Definition at line 1163 of file popl.h.

◆ ~BashCompletionOptionPrinter()

Piduino::BashCompletionOptionPrinter::~BashCompletionOptionPrinter ( )
overridedefault

Member Function Documentation

◆ print()

std::string Piduino::BashCompletionOptionPrinter::print ( const Attribute max_attribute = Attribute::optional) const
inlineoverridevirtual

Create a help message

Parameters
max_attributeshow options up to this level (optional, advanced, expert)
Returns
the help message

Implements Piduino::OptionPrinter.

Definition at line 1167 of file popl.h.

References Piduino::OptionPrinter::option_parser_, and program_name_.

Member Data Documentation

◆ option_parser_

const OptionParser* Piduino::OptionPrinter::option_parser_
protectedinherited

◆ program_name_

std::string Piduino::BashCompletionOptionPrinter::program_name_
private

Definition at line 485 of file popl.h.

Referenced by print().