HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pxr_CLI::CLI::FormatterBase Class Referenceabstract

#include <CLI11.h>

+ Inheritance diagram for pxr_CLI::CLI::FormatterBase:

Public Member Functions

Basic
 FormatterBase ()=default
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
 FormatterBase (const FormatterBase &)=default
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
 FormatterBase (FormatterBase &&)=default
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
FormatterBaseoperator= (const FormatterBase &)=default
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
FormatterBaseoperator= (FormatterBase &&)=default
 Adding a destructor in this form to work around bug in GCC 4.7. More...
 
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 (std::size_t val)
 Set the column width. More...
 
Getters
CLI11_NODISCARD std::string get_label (std::string key) const
 Get the current value of a name (REQUIRED, etc.) More...
 
CLI11_NODISCARD std::size_t get_column_width () const
 Get the current column width. More...
 

Protected Attributes

Options
std::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 3997 of file CLI11.h.

Constructor & Destructor Documentation

pxr_CLI::CLI::FormatterBase::FormatterBase ( )
default

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

pxr_CLI::CLI::FormatterBase::FormatterBase ( const FormatterBase )
default

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

pxr_CLI::CLI::FormatterBase::FormatterBase ( FormatterBase &&  )
default

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

virtual pxr_CLI::CLI::FormatterBase::~FormatterBase ( )
inlinevirtualnoexcept

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

Definition at line 4021 of file CLI11.h.

Member Function Documentation

void pxr_CLI::CLI::FormatterBase::column_width ( std::size_t  val)
inline

Set the column width.

Definition at line 4034 of file CLI11.h.

CLI11_NODISCARD std::size_t pxr_CLI::CLI::FormatterBase::get_column_width ( ) const
inline

Get the current column width.

Definition at line 4048 of file CLI11.h.

CLI11_NODISCARD std::string pxr_CLI::CLI::FormatterBase::get_label ( std::string  key) const
inline

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

Definition at line 4041 of file CLI11.h.

void pxr_CLI::CLI::FormatterBase::label ( std::string  key,
std::string  val 
)
inline

Set the "REQUIRED" label.

Definition at line 4031 of file CLI11.h.

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

This is the key method that puts together help.

Implemented in pxr_CLI::CLI::Formatter, and pxr_CLI::CLI::FormatterLambda.

FormatterBase& pxr_CLI::CLI::FormatterBase::operator= ( const FormatterBase )
default

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

FormatterBase& pxr_CLI::CLI::FormatterBase::operator= ( FormatterBase &&  )
default

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

Member Data Documentation

std::size_t pxr_CLI::CLI::FormatterBase::column_width_ {30}
protected

The width of the first column.

Definition at line 4003 of file CLI11.h.

std::map<std::string, std::string> pxr_CLI::CLI::FormatterBase::labels_ {}
protected

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

Definition at line 4007 of file CLI11.h.


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