cwidget::config::column_generator Class Reference

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

#include <column_definition.h>

List of all members.

Public Member Functions

virtual column_disposition setup_column (int type)=0
 Computes the text and column offset of a column of the given type.
 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.

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

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:
width The width of the terminal for which the columns are being formatted.
p The positional parameters passed to the layout operation.
Returns:
a string of width width formatted according to this object's definition list.

References cwidget::config::column_definition::COLUMN_GENERATED, cwidget::config::column_definition::COLUMN_LITERAL, cwidget::config::column_definition::COLUMN_PARAM, and 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.

Referenced by layout_columns().


The documentation for this class was generated from the following files:
Generated on Sun May 9 13:04:55 2010 for cwidget by  doxygen 1.6.3