koutil
Loading...
Searching...
No Matches
koutil::args::help_printer_t< Result > Class Template Reference

#include <help.h>

Public Types

using result_t = Result
 
using command_t = command_t<result_t>
 
using option_t = option_t<result_t>
 
using argument_t = argument_t<result_t>
 

Public Member Functions

 help_printer_t (const command_t &cmd, std::size_t terminal_size=80)
 
void print (std::ostream &out)
 

Private Member Functions

void print_arguments (std::ostream &out, const std::vector< argument_t > &args)
 
void print_options (std::ostream &out, const std::vector< option_t > &options)
 
void print_commands (std::ostream &out, const std::vector< command_t > &cmds)
 
void print_item (std::ostream &out, std::size_t max_size, std::string_view prefix, std::string_view name, std::string_view description)
 

Private Attributes

const command_tm_cmd
 
std::size_t m_term_size
 

Member Typedef Documentation

◆ argument_t

template<extends_result Result>
using koutil::args::help_printer_t< Result >::argument_t = argument_t<result_t>

◆ command_t

template<extends_result Result>
using koutil::args::help_printer_t< Result >::command_t = command_t<result_t>

◆ option_t

template<extends_result Result>
using koutil::args::help_printer_t< Result >::option_t = option_t<result_t>

◆ result_t

template<extends_result Result>
using koutil::args::help_printer_t< Result >::result_t = Result

Constructor & Destructor Documentation

◆ help_printer_t()

template<extends_result Result>
koutil::args::help_printer_t< Result >::help_printer_t ( const command_t & cmd,
std::size_t terminal_size = 80 )
inline

Member Function Documentation

◆ print()

template<extends_result Result>
void koutil::args::help_printer_t< Result >::print ( std::ostream & out)

◆ print_arguments()

template<extends_result Result>
void koutil::args::help_printer_t< Result >::print_arguments ( std::ostream & out,
const std::vector< argument_t > & args )
private

◆ print_commands()

template<extends_result Result>
void koutil::args::help_printer_t< Result >::print_commands ( std::ostream & out,
const std::vector< command_t > & cmds )
private

◆ print_item()

template<extends_result Result>
void koutil::args::help_printer_t< Result >::print_item ( std::ostream & out,
std::size_t max_size,
std::string_view prefix,
std::string_view name,
std::string_view description )
private

◆ print_options()

template<extends_result Result>
void koutil::args::help_printer_t< Result >::print_options ( std::ostream & out,
const std::vector< option_t > & options )
private

Member Data Documentation

◆ m_cmd

template<extends_result Result>
const command_t& koutil::args::help_printer_t< Result >::m_cmd
private

◆ m_term_size

template<extends_result Result>
std::size_t koutil::args::help_printer_t< Result >::m_term_size
private

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