|
ZeroErr
|
Table is used to generate a table with configurable style. More...
#include <table.h>


Classes | |
| struct | Style |
| Style is used to define the border style of the table. More... | |
| struct | Config |
| Config is used to configure the table style how it is displayed. More... | |
Public Member Functions | |
| Table () | |
| Table (zeroerr::String title) | |
| Table (unsigned width, unsigned height) | |
| Table (zeroerr::String title, unsigned width, unsigned height) | |
| ~Table () | |
| zeroerr::String | str (Config config=Config(), Style style=Table::getStyle("square_double_head")) |
| str is used to generate the table string. | |
| void | set_header (std::vector< zeroerr::String > _header) |
| void | add_row (std::initializer_list< zeroerr::String > _row) |
| template<typename T, typename... Args> | |
| void | push_back (std::vector< zeroerr::String > &row, T &&t, Args &&... args) |
| template<typename T> | |
| void | push_back (std::vector< zeroerr::String > &row, T &&t) |
| template<typename... Args> | |
| void | add_row (Args &&... args) |
| template<typename T, typename... Args> | |
| void | add_rows (T &&t, Args &&... args) |
| template<typename T> | |
| void | add_rows (T &&t) |
| Public Member Functions inherited from zeroerr::Card | |
| Card () | |
| Card (zeroerr::String title) | |
| Card (unsigned width, unsigned height) | |
| Card (zeroerr::String title, unsigned width, unsigned height) | |
| void | show (std::ostream &os, zeroerr::String str) |
Static Public Member Functions | |
| static void | registerStyle (zeroerr::String name, Style style) |
| static Style | getStyle (zeroerr::String name) |
| getStyle can load predefined style from the StyleManager. | |
Protected Member Functions | |
| _push_back (rank< 0 >, std::vector< zeroerr::String > &row, T &&t) | |
| _push_back (rank< 2 >, std::vector< zeroerr::String > &row, T t) | |
| _push_back (rank< 1 >, std::vector< zeroerr::String > &row, const T &t) | |
Protected Attributes | |
| std::vector< unsigned > | col_width |
| std::vector< zeroerr::String > | header |
| std::vector< zeroerr::String > | footer |
| std::vector< std::vector< zeroerr::String > > | cells |
Additional Inherited Members | |
| Public Attributes inherited from zeroerr::Card | |
| zeroerr::String | title |
| unsigned | width |
| unsigned | height |
Table is used to generate a table with configurable style.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
getStyle can load predefined style from the StyleManager.
| name | is the name of the style. Available styles: "ascii" "ascii2" "ascii_double_head" "square" "square_double_head" "simple" "simple_head" "simple_heavy" "horizontal" "rounded" "heavy" "heavy_edge" "heavy_head" "double" "double_edge" "minimal" "minimal_heavy_head" "minimal_double_hea |
|
inline |
|
inline |
|
static |
|
inline |
| zeroerr::String zeroerr::Table::str | ( | Config | config = Config(), |
| Table::Style | s = Table::getStyle("square_double_head") ) |
str is used to generate the table string.
| config | decides how the table is displayed. |
| style | decides the border style of the table. |
|
protected |
|
protected |
|
protected |
|
protected |