Table is used to generate a table with configurable style.
More...
#include <table.h>
|
| Table () |
|
| Table (std::string title) |
|
| Table (unsigned width, unsigned height) |
|
| Table (std::string title, unsigned width, unsigned height) |
|
| ~Table () |
|
std::string | str (Config config=Config(), Style style=Table::getStyle("square_double_head")) |
| str is used to generate the table string. More...
|
|
void | set_header (std::vector< std::string > _header) |
|
void | add_row (std::initializer_list< std::string > _row) |
|
template<typename T , typename... Args> |
void | push_back (std::vector< std::string > &row, T &&t, Args &&... args) |
|
template<typename T > |
void | push_back (std::vector< std::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) |
|
| Card () |
|
| Card (std::string title) |
|
| Card (unsigned width, unsigned height) |
|
| Card (std::string title, unsigned width, unsigned height) |
|
void | show (std::ostream &os, std::string str) |
|
|
std::vector< unsigned > | col_width |
|
std::vector< std::string > | header |
|
std::vector< std::string > | footer |
|
std::vector< std::vector< std::string > > | cells |
|
Table is used to generate a table with configurable style.
◆ Table() [1/4]
zeroerr::Table::Table |
( |
| ) |
|
|
inline |
◆ Table() [2/4]
zeroerr::Table::Table |
( |
std::string |
title | ) |
|
|
inline |
◆ Table() [3/4]
zeroerr::Table::Table |
( |
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| |
|
inline |
◆ Table() [4/4]
zeroerr::Table::Table |
( |
std::string |
title, |
|
|
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| |
|
inline |
◆ ~Table()
zeroerr::Table::~Table |
( |
| ) |
|
|
inline |
◆ _push_back() [1/3]
zeroerr::Table::_push_back |
( |
rank< 0 > |
, |
|
|
std::vector< std::string > & |
row, |
|
|
T && |
t |
|
) |
| |
|
inlineprotected |
◆ _push_back() [2/3]
zeroerr::Table::_push_back |
( |
rank< 1 > |
, |
|
|
std::vector< std::string > & |
row, |
|
|
const T & |
t |
|
) |
| |
|
inlineprotected |
◆ _push_back() [3/3]
zeroerr::Table::_push_back |
( |
rank< 2 > |
, |
|
|
std::vector< std::string > & |
row, |
|
|
T |
t |
|
) |
| |
|
inlineprotected |
◆ add_row() [1/2]
template<typename... Args>
void zeroerr::Table::add_row |
( |
Args &&... |
args | ) |
|
|
inline |
◆ add_row() [2/2]
void zeroerr::Table::add_row |
( |
std::initializer_list< std::string > |
_row | ) |
|
|
inline |
◆ add_rows() [1/2]
template<typename T >
void zeroerr::Table::add_rows |
( |
T && |
t | ) |
|
|
inline |
◆ add_rows() [2/2]
template<typename T , typename... Args>
void zeroerr::Table::add_rows |
( |
T && |
t, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
◆ getStyle()
getStyle can load predefined style from the StyleManager.
- Parameters
-
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 |
◆ push_back() [1/2]
template<typename T >
void zeroerr::Table::push_back |
( |
std::vector< std::string > & |
row, |
|
|
T && |
t |
|
) |
| |
|
inline |
◆ push_back() [2/2]
template<typename T , typename... Args>
void zeroerr::Table::push_back |
( |
std::vector< std::string > & |
row, |
|
|
T && |
t, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
◆ registerStyle()
void zeroerr::Table::registerStyle |
( |
std::string |
name, |
|
|
Table::Style |
style |
|
) |
| |
|
static |
◆ set_header()
void zeroerr::Table::set_header |
( |
std::vector< std::string > |
_header | ) |
|
|
inline |
◆ str()
str is used to generate the table string.
- Parameters
-
config | decides how the table is displayed. |
style | decides the border style of the table. |
◆ cells
std::vector<std::vector<std::string> > zeroerr::Table::cells |
|
protected |
◆ col_width
std::vector<unsigned> zeroerr::Table::col_width |
|
protected |
◆ footer
std::vector<std::string> zeroerr::Table::footer |
|
protected |
◆ header
std::vector<std::string> zeroerr::Table::header |
|
protected |
The documentation for this class was generated from the following files: