cwidget  0.5.17
Public Member Functions | List of all members
cwidget::config::column_generator Class Referenceabstract

The class that defines how to parse and generate columns. More...

#include <column_definition.h>

Public Member Functions

virtual column_disposition setup_column (int type)=0
 Computes the text and column offset of a column of the given type. More...
 
 column_generator (const column_definition_list &_columns)
 Create a column generator for the given list of column specifications.
 
std::wstring layout_columns (unsigned int width, column_parameters &p)
 Given the target width and positional parameters, construct an output string to be displayed on the terminal. More...
 

Detailed Description

The class that defines how to parse and generate columns.

Typically, when formatting a list of columnar data, one instance of a subclass of column_generator will be created for each row.

Member Function Documentation

◆ layout_columns()

wstring cwidget::config::column_generator::layout_columns ( unsigned int  width,
column_parameters p 
)

Given the target width and positional parameters, construct an output string to be displayed on the terminal.

Parameters
widthThe width of the terminal for which the columns are being formatted.
pThe positional parameters passed to the layout operation.
Returns
a string of width #width formatted according to this object's definition list.

◆ setup_column()

virtual column_disposition cwidget::config::column_generator::setup_column ( int  type)
pure virtual

Computes the text and column offset of a column of the given type.


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