20 #ifndef GEOS_COMMON_FORMAT_TABLE_TABLEFORMATTER_HPP
21 #define GEOS_COMMON_FORMAT_TABLE_TABLEFORMATTER_HPP
25 #include "TableTypes.hpp"
65 std::unique_ptr< geos::TableErrorListing >
m_errors = std::make_unique< geos::TableErrorListing >();
138 template<
typename DATASOURCE >
139 string toString( DATASOURCE
const & tableData )
const;
165 template<
typename DATASOURCE >
166 void toStream( std::ostream & outputStream, DATASOURCE
const & tableData )
const
174 { m_showErrors = cond; }
178 bool m_showErrors =
true;
188 string TableCSVFormatter::toString< TableData >(
TableData const & tableData )
const;
224 template<
typename DATASOURCE >
225 string toString( DATASOURCE
const & tableData )
const;
242 template<
typename DATASOURCE >
243 void toStream( std::ostream & outputStream, DATASOURCE
const & tableData )
const
249 static constexpr
char m_verticalLine =
'|';
251 static constexpr
char m_horizontalLine =
'-';
268 size_t & tableTotalWidth )
const;
280 std::ostream & tableOutput,
284 size_t tableTotalWidth )
const;
294 std::ostream & tableOutput )
const;
304 std::ostream & tableOutput )
const;
315 size_t const nbVisibleColumn )
const;
330 size_t nbVisibleColumn )
const;
340 size_t const nbVisibleColumn )
const;
382 bool const compress )
const;
402 void formatCell( std::ostream & tableOutput,
404 size_t idxLine )
const;
413 string TableTextFormatter::toString< TableData >(
TableData const & tableData )
const;
Variation of the TableLayout to store precomputed layout information, ready to be formatted.
Class for managing table data.
Class for retrieving errors in the table classes.
View on cell data with information to display it in a table (content, type, alignment,...
Class for setup the table layout.
TableTextFormatter()
Construct a default Table Formatter without layout specification (to only insert data in it,...
TableTextFormatter(TableLayout const &tableLayout)
Construct a new TableFormatter from a tableLayout.
void toStream(std::ostream &outputStream) const
Output the formatted data to a stream. Adds appropriate messages to the error list when the operation...
void toStream(std::ostream &outputStream, DATASOURCE const &tableData) const
Output the formatted data to a stream. Adds appropriate messages to the error list when the operation...
string toString(DATASOURCE const &tableData) const
Convert a data source to a table string.
std::string_view string_view
String type.
internal::StdVectorWrapper< T, Allocator, USE_STD_CONTAINER_BOUNDS_CHECKING > stdVector