20 #ifndef GEOS_COMMON_FORMAT_TABLE_TABLEFORMATTER_HPP
21 #define GEOS_COMMON_FORMAT_TABLE_TABLEFORMATTER_HPP
25 #include "TableTypes.hpp"
38 using RowsCellInput = std::vector< std::vector< TableData::CellData > >;
40 using CellLayoutRows = std::vector< std::vector< TableLayout::CellLayout > >;
95 template<
typename DATASOURCE >
96 string toString( DATASOURCE
const & tableData )
const;
106 string TableCSVFormatter::toString< TableData >(
TableData const & tableData )
const;
140 template<
typename DATASOURCE >
141 string toString( DATASOURCE
const & tableData )
const;
146 static constexpr
char m_verticalLine =
'|';
148 static constexpr
char m_horizontalLine =
'-';
159 void initalizeTableLayout(
TableLayout & tableLayout,
163 string & separatorLine,
164 size_t & nbEnabledColumn )
const;
174 std::ostringstream & tableOutput,
178 size_t & nbEnabledColumn )
const;
184 void setLinks( std::vector< TableLayout::Column > & columns )
const;
191 void populateHeaderCellsLayout(
TableLayout & tableLayout,
200 void populateDataCellsLayout(
TableLayout & tableLayout,
214 void updateColumnMaxLength(
TableLayout & tableLayout,
229 string & separatorLine,
230 size_t & nbEnabledColumn )
const;
239 size_t nbHiddenColumns,
240 size_t const paddingCharacters )
const;
249 std::ostringstream & tableOutput,
260 std::ostringstream & tableOutput,
262 size_t idxLine )
const;
275 std::ostringstream & tableOutput,
276 std::vector< size_t >
const & nbLinesRow,
279 size_t & nbEnabledColumn )
const;
288 string TableTextFormatter::toString< TableData >(
TableData const & tableData )
const;
Class for managing table data.
Class for setup the table layout.
TableTextFormatter()
Construct a new TableFormatter.
TableTextFormatter(TableLayout const &tableLayout)
Construct a new TableFormatter from a tableLayout.
string toString(DATASOURCE const &tableData) const
Convert a data source to a table string.
CellType
The different type a cell can handle.
std::string_view string_view
String type.
Structure grouping the cell information to display it in a table (content, type, alignment,...