Class for setup the table layout.
More...
#include <TableLayout.hpp>
|
enum | Alignment { right
, left
, center
} |
| Type of aligment for a column.
|
|
enum | MarginValue : integer { tiny = 0
, small = 1
, medium = 2
, large = 3
} |
| Space to apply between all data and border.
|
|
enum | Section { header
, values
} |
| Enumeration for table sections.
|
|
using | TableLayoutArgs = std::initializer_list< std::variant< string_view, TableLayout::Column > > |
| Alias for an initializer list of variants that can contain either a string or a layout column.
|
|
Class for setup the table layout.
Definition at line 35 of file TableLayout.hpp.
◆ TableLayout() [1/4]
Construct a new Table Layout object.
- Parameters
-
title | The table title |
columns | A vector containing all column initialized |
Definition at line 364 of file TableLayout.hpp.
◆ TableLayout() [2/4]
Construct a new Table Layout object.
- Parameters
-
title | The table title |
args | An initializer_list containing string / column |
Definition at line 380 of file TableLayout.hpp.
◆ TableLayout() [3/4]
Construct a new Table Layout object.
- Parameters
-
args | An initializer_list containing string / column |
Definition at line 393 of file TableLayout.hpp.
◆ TableLayout() [4/4]
geos::TableLayout::TableLayout |
( |
string_view |
title, |
|
|
std::vector< string > const & |
args |
|
) |
| |
|
inline |
Construct a new Table Layout object.
- Parameters
-
title | The table title |
args | An initializer_list containing string / column |
Definition at line 404 of file TableLayout.hpp.
◆ addToColumns()
void geos::TableLayout::addToColumns |
( |
string_view |
m_header | ) |
|
Create and add a column to the columns vector given a string.
- Parameters
-
◆ beginDeepFirst()
- Returns
- Return an itarator pointing on the first leaf of the first columns vector Example on 2 column with Column A : 2 layer and Column B : 3 layers A.A -> A-B -> A-C -> A -> B-A-A -> B-A-B -> B-A -> B-B-A -> B-B-B -> B-B -> B
◆ enableLineBreak()
TableLayout& geos::TableLayout::enableLineBreak |
( |
bool |
value | ) |
|
Remove the return line at the end & begenning of the table.
- Parameters
-
value | Value to desactivate or not wrapLine at the end |
- Returns
- The tableLayout reference
◆ endDeepFirst()
- Returns
- Return a end itarator This iterator is initialized with a null pointer representing a position after the last valid element
Definition at line 349 of file TableLayout.hpp.
◆ getBorderMargin()
integer const& geos::TableLayout::getBorderMargin |
( |
| ) |
const |
|
inline |
- Returns
- The border margin, number of spaces at both left and right table sides plus vertical character
Definition at line 466 of file TableLayout.hpp.
◆ getColumnMargin()
integer const& geos::TableLayout::getColumnMargin |
( |
| ) |
const |
|
inline |
- Returns
- The column margin, numbers of spaces separating both left and right side from a vertical line
Definition at line 473 of file TableLayout.hpp.
◆ getColumns() [1/2]
std::vector< Column >& geos::TableLayout::getColumns |
( |
| ) |
|
|
inline |
◆ getColumns() [2/2]
std::vector< Column > const& geos::TableLayout::getColumns |
( |
| ) |
const |
|
inline |
◆ getMarginTitle()
integer const& geos::TableLayout::getMarginTitle |
( |
| ) |
const |
|
inline |
◆ getMarginValue()
integer const& geos::TableLayout::getMarginValue |
( |
| ) |
const |
|
inline |
◆ getMaxDepth()
size_t geos::TableLayout::getMaxDepth |
( |
| ) |
const |
Get the max depth of a column.
- Returns
- The max column depth
◆ getNbSubDataLines()
std::vector< size_t >& geos::TableLayout::getNbSubDataLines |
( |
| ) |
|
|
inline |
Get the Nb Rows object.
- Returns
- std::vector< integer >&
Definition at line 499 of file TableLayout.hpp.
◆ getSublineInHeaderCounts()
std::vector< size_t >& geos::TableLayout::getSublineInHeaderCounts |
( |
| ) |
|
|
inline |
Get the Nb Rows object.
- Returns
- std::vector< integer >&
Definition at line 492 of file TableLayout.hpp.
◆ getTitle()
◆ isLineBreakEnabled()
bool geos::TableLayout::isLineBreakEnabled |
( |
| ) |
const |
- Returns
- check if the line break at the end & beginning is activated
◆ setMargin()
Set the minimal margin width between cell content and borders.
- Parameters
-
marginValue | The margin value |
- Returns
- The tableLayout reference
◆ setTitle()
- Parameters
-
- Returns
- The tableLayout reference
The documentation for this class was generated from the following file: